aboutsummaryrefslogtreecommitdiffstats
path: root/cse.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-28 10:38:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:08 -0700
commite19250992c2bf7b95dafed7dea3751428bdf7c32 (patch)
tree4e7b1b53a34f43e1007f36c7bf0fa0ba74f5d31b /cse.c
parente533ccc8e3665fa22a1e6ae11b217d0e5601f08c (diff)
downloadsparse-e19250992c2bf7b95dafed7dea3751428bdf7c32.tar.gz
sparse-e19250992c2bf7b95dafed7dea3751428bdf7c32.tar.xz
sparse-e19250992c2bf7b95dafed7dea3751428bdf7c32.zip
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.
Diffstat (limited to 'cse.c')
-rw-r--r--cse.c6
1 files changed, 5 insertions, 1 deletions
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: