diff options
author | Dan Gohman <sunfish@mozilla.com> | 2014-05-07 15:27:15 -0700 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2014-05-07 16:09:13 -0700 |
commit | 824d2794c1476cca66b0a9a349cbebf749603fc3 (patch) | |
tree | cd4b5439c68c825e9fc434f4d20dabbd4934219e | |
parent | 98a6e9b5dc8a986bd606b1862ae6d033349111dd (diff) |
Make bottom-up and top-down liveness propagation independent. This fixes Bug 1006301.
-rw-r--r-- | lib/Target/JSBackend/AllocaManager.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/JSBackend/AllocaManager.cpp b/lib/Target/JSBackend/AllocaManager.cpp index a77ddc7324..aac7abdec3 100644 --- a/lib/Target/JSBackend/AllocaManager.cpp +++ b/lib/Target/JSBackend/AllocaManager.cpp @@ -247,9 +247,8 @@ void AllocaManager::computeInterBlockLiveness() { } // If it contains new live blocks, prepare to propagate them. - if (Temp.test(BLI.LiveIn)) { - BLI.LiveIn |= Temp; - Temp.reset(BLI.End); + Temp.reset(BLI.End); + if (Temp.test(BLI.LiveOut)) { BLI.LiveOut |= Temp; for (succ_const_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) { @@ -265,10 +264,9 @@ void AllocaManager::computeInterBlockLiveness() { } // If it contains new live blocks, prepare to propagate them. - if (Temp.test(BLI.LiveOut)) { - // TODO: As above, what are the semantics of a standalone lifetime end? - BLI.LiveOut |= Temp; - Temp.reset(BLI.Start); + // TODO: As above, what are the semantics of a standalone lifetime end? + Temp.reset(BLI.Start); + if (Temp.test(BLI.LiveIn)) { BLI.LiveIn |= Temp; for (const_pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI != PE; ++PI) { |