From b4bf1d0987c5bbf7e0dfa6f53cf81a2cb869d759 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 18 May 2014 11:34:38 +0800 Subject: ... --- compile_data/func_pointer.c | 2 +- ssa.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compile_data/func_pointer.c b/compile_data/func_pointer.c index 1d74894..f239b55 100644 --- a/compile_data/func_pointer.c +++ b/compile_data/func_pointer.c @@ -1,4 +1,4 @@ -#include +#include typedef void (*Func_t)(); void f(Func_t func, int step) { if (!step) return; diff --git a/ssa.c b/ssa.c index ba76a2b..e1c0e4c 100644 --- a/ssa.c +++ b/ssa.c @@ -2145,7 +2145,7 @@ void const_propagation(void) { int i; for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ni, ih = b->insts; for (i = ih->next; i != ih; i = ni) { @@ -2282,7 +2282,7 @@ void strength_reduction(void) { int call_cnt = 0; for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ni, ih = b->insts; for (i = ih->next; i != ih; i = ni) { @@ -2615,7 +2615,7 @@ void deadcode_elimination() { int i; for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ih = b->insts; for (i = ih->next; i != ih; i = i->next) { @@ -2626,7 +2626,7 @@ void deadcode_elimination() { } for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ih = b->insts; for (i = ih->next; i != ih; i = i->next) if (i->op != CALL && i->dest && i->dest->kind == TMP && !i->dest->dep) -- cgit v1.2.3