From e19250992c2bf7b95dafed7dea3751428bdf7c32 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 28 Nov 2004 10:38:52 -0700 Subject: Allow CSE to run after bb packing. ...but we can't merge phi-sources after packing. Or rather, we could, but we'll have to be more careful about not re-ordering them, which we aren't. Sort it out later. --- cse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cse.c') diff --git a/cse.c b/cse.c index 4c91e56..a35177e 100644 --- a/cse.c +++ b/cse.c @@ -22,7 +22,7 @@ static struct instruction_list *insn_hash_table[INSN_HASH_SIZE]; #define hashval(x) ((unsigned long)(x)) -int repeat_phase; +int repeat_phase, merge_phi_sources; static int phi_compare(pseudo_t phi1, pseudo_t phi2) { @@ -209,6 +209,10 @@ static int insn_compare(const void *_i1, const void *_i2) return i1->src1 < i2->src1 ? -1 : 1; if (i1->bb != i2->bb) return i1->bb < i2->bb ? -1 : 1; + if (!merge_phi_sources) { + if (i1 != i2) + return i1 < i2 ? -1 : 1; + } break; default: -- cgit v1.2.3