From 824d2794c1476cca66b0a9a349cbebf749603fc3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 7 May 2014 15:27:15 -0700 Subject: Make bottom-up and top-down liveness propagation independent. This fixes Bug 1006301. --- lib/Target/JSBackend/AllocaManager.cpp | 12 +++++------- 1 file 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) { -- cgit v1.2.3-18-g5258