Commit 0ead7ea6 authored by Julian Kranz's avatar Julian Kranz
Browse files

Liveness

parent f1f554f1
......@@ -9,6 +9,8 @@ val test-instructions-0 = do
t1 <- mktemp;
t2 <- mktemp;
t3 <- mktemp;
t4 <- mktemp;
t5 <- mktemp;
#mov 1 t0 (imm 3);
# mov 1 t1 (imm 4);
......@@ -39,14 +41,16 @@ val test-instructions-0 = do
#mov 17 t1 (var t2);
#mov 16 xmm10 (var t1);
_while (/d (var t1)) __ do
mov 16 t1 (imm 33);
mov 16 t1 (imm 99)
_while (/d (var t5)) __ do
mov 16 t0 (var t2);
mov 16 t2 (var t1);
mov 16 t1 (var t4);
mov 16 t1 (var t3);
end;
mov 32 t0 (imm 99);
mov 32 t1 (var t0);
mov 32 t1 (imm 11);
#mov 32 t0 (imm 99);
#mov 32 t1 (var t0);
#mov 32 t1 (imm 11);
mov 16 xmm10 (var t0)
#add 32 t0 (var t1) (var t2);
......
......@@ -350,7 +350,7 @@ val lvstate-eval state stmt =
# HACK: if a statement doesn't kill anything make the {gen} set live
# alternative: explicitly inspect the visited statement
if bbtree-empty? kill
then gen
then (lv-union state gen)
else
lv-union
(lv-difference state kill)
......
......@@ -29,7 +29,7 @@ int main (int argc, char** argv) {
__obj state = __createState(NULL, 0, 0, 0);
__obj r = __runMonadicNoArg(__tinsng__, &state);
__obj insns = __RECORD_SELECT(state, ___maybelive);
__obj insns = __RECORD_SELECT(state, ___live);
size_t size = 256*1024;
char fmt[size];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment