Commit 1eedb320 authored by Julian Kranz's avatar Julian Kranz

Liveness bug fix

parent 178f4523
...@@ -257,8 +257,13 @@ val lv-analyze initial-live stack = ...@@ -257,8 +257,13 @@ val lv-analyze initial-live stack =
first-it-state <- sweep body-rev empty-state; first-it-state <- sweep body-rev empty-state;
live-stack-backup-and-reset; live-stack-backup-and-reset;
second-it-state <- sweep body-rev (lvstate-union-conservative (lvstate-eval state x.hd) first-it-state); #add live variables of the condition of the loop
# state-new <- return (lvstate-union-conservative state body-state); first-it-state-with-cond <- return (lvstate-eval first-it-state x.hd);
second-it-state <- sweep body-rev (lvstate-union-conservative state first-it-state-with-cond);
#add live variables of the condition of the loop
second-it-state-with-cond <- return (lvstate-eval second-it-state x.hd);
body-live <- query $live; body-live <- query $live;
#maybelive <- query $maybelive; #maybelive <- query $maybelive;
...@@ -266,7 +271,7 @@ val lv-analyze initial-live stack = ...@@ -266,7 +271,7 @@ val lv-analyze initial-live stack =
live-stack-restore backup; live-stack-restore backup;
#lv-push-live (/WHILE y.cond maybelive); #lv-push-live (/WHILE y.cond maybelive);
lv-push-live (/WHILE y.cond body-live); lv-push-live (/WHILE y.cond body-live);
sweep x.tl second-it-state sweep x.tl second-it-state-with-cond
end end
| SEM_ITE y: do | SEM_ITE y: do
org-backup <- live-stack-backup-and-reset; org-backup <- live-stack-backup-and-reset;
......
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