From 98e74915428c122a0d004ceced1c90b428296f47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Fri, 29 Apr 2005 12:04:35 +0000 Subject: [PATCH] made 'add' functions visible so I can update the trout information in other algorithms normalized state function behaviour [r5741] --- ir/ana/trouts.c | 3 ++- ir/ana/trouts.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ir/ana/trouts.c b/ir/ana/trouts.c index 4a2501b79..90148e00c 100644 --- a/ir/ana/trouts.c +++ b/ir/ana/trouts.c @@ -479,7 +479,8 @@ irg_outs_state get_trouts_state(void) { return irp->trouts_state; } void set_trouts_inconsistent(void) { - irp->trouts_state = outs_inconsistent; + if (irp->trouts_state == outs_consistent) + irp->trouts_state = outs_inconsistent; } diff --git a/ir/ana/trouts.h b/ir/ana/trouts.h index c04775863..9026e8cfc 100644 --- a/ir/ana/trouts.h +++ b/ir/ana/trouts.h @@ -70,6 +70,7 @@ ir_node *get_type_alloc(type *tp, int pos); int get_type_n_casts(type *tp); /** Cast node that cast a pointer to this type. */ ir_node *get_type_cast(type *tp, int pos); +void add_type_cast(type *tp, ir_node *cast); /** Return number of upcasts. O(#casts). */ int get_class_n_upcasts(type *clss); /** Return number of downcasts. O(#casts). */ @@ -78,6 +79,7 @@ int get_class_n_downcasts(type *clss); /* Access all pointer types that point to tp. */ int get_type_n_pointertypes_to(type *tp); type *get_type_pointertype_to(type *tp, int pos); +void add_type_pointertype_to(type *tp, type *ptp); /* @@@ TODO: compute all entities that use a type. */ @@ -90,6 +92,7 @@ type *get_type_pointertype_to(type *tp, int pos); * We reuse the enum of irouts. * @see irouts.h. */ irg_outs_state get_trouts_state(void); +/** Set the tr out state to inconsistent if it is consistent. */ void set_trouts_inconsistent(void); /** Compute the outs of types and entities. -- 2.20.1