summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-07-15 19:31:10 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2016-07-15 19:31:42 +0200
commit2020d50aa5d684ae79bb56cf17b8eed62b66acf1 (patch)
tree0f4f75cd2868e072d5d56989ae851af3010983bb
parent96a356d92229cecffaa66d7226f662ee9ebfeccb (diff)
-rw-r--r--ir/ana/constbits.c12
-rw-r--r--ir/ana/constbits.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/ir/ana/constbits.c b/ir/ana/constbits.c
index 2a0328d..494b13a 100644
--- a/ir/ana/constbits.c
+++ b/ir/ana/constbits.c
@@ -18,6 +18,7 @@
#include "irnode_t.h"
#include "irnodemap.h"
#include "iropt.h"
+#include "util.h"
#ifndef VERIFY_CONSTBITS
# ifdef DEBUG_libfirm
@@ -815,7 +816,16 @@ static void trigger_users(ir_node const *const irn)
if (get_irn_mode(src) == mode_T) {
/* Trigger Projs of tuple nodes. They might contain analysis information,
* but the tuple node does not. */
- trigger_users(src);
+ bitinfo_state state = BITINFO_INVALID;
+ foreach_out_edge(src, e) {
+ bitinfo *const b = get_bitinfo_direct(irn);
+ if (b) {
+ state = MAX(state, b->state);
+ }
+ }
+ if (state == BITINFO_VALID) {
+ trigger_users(src);
+ }
} else {
trigger(src, irn);
}
diff --git a/ir/ana/constbits.h b/ir/ana/constbits.h
index cf9d076..0a0abf9 100644
--- a/ir/ana/constbits.h
+++ b/ir/ana/constbits.h
@@ -6,9 +6,9 @@
typedef enum bitinfo_state {
BITINFO_INVALID,
+ BITINFO_UNSTABLE,
BITINFO_VALID,
BITINFO_IN_FLIGHT,
- BITINFO_UNSTABLE,
} bitinfo_state;
typedef struct bitinfo