aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2014-05-05 21:30:39 +0800
committerTeddy <ted.sybil@gmail.com>2014-05-05 21:30:39 +0800
commit6ec15abe28a2589e5d03d56438f0727261e3cef6 (patch)
treee0e124bb2d2ff5aa77282a47ad611026bc57352e
parenta144dc6641b8d0ac58c7e302e78c65810ad171dd (diff)
...
-rw-r--r--ssa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ssa.c b/ssa.c
index 8ae8afe..b6cf00b 100644
--- a/ssa.c
+++ b/ssa.c
@@ -1912,6 +1912,7 @@ void init_def(void) {
opr->spill = cinterv_repr(opr);
}
/* coalescing */
+ /*
for (p = entry; p; p = p->next)
{
CInst_t i, ih = p->insts;
@@ -1919,6 +1920,7 @@ void init_def(void) {
if (i->op == MOVE && i->dest->kind == TMP && i->src1->kind == TMP)
cinterv_union(i->dest, i->src1);
}
+ */
}
void print_intervals(void) {
@@ -2429,7 +2431,7 @@ void subexp_elimination_(CBlock_t b, CExpMap_t cem) {
}
else if (i->op == CALL)
{
- /* cexpmap_clear(cem); */
+ cexpmap_clear(cem);
continue;
}
copr_shortcut(&i->src1);
@@ -2456,6 +2458,7 @@ void subexp_elimination_(CBlock_t b, CExpMap_t cem) {
}
}
}
+ cexpmap_clear(cem);
for (e = dtree.head[b->id]; e; e = e->next)
subexp_elimination_(e->to, cem);
}
@@ -2568,7 +2571,7 @@ void ssa_func(CType_t func) {
renaming_vars(oprs);
/* optimization on SSA */
const_propagation();
-/* subexp_elimination(); */
+ subexp_elimination();
strength_reduction();
deadcode_elimination();
/* out of SSA */