[llvm] r304049 - BranchRelaxation: computeLiveIns() after creating new block

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 17:53:48 PDT 2017


Author: matze
Date: Fri May 26 19:53:48 2017
New Revision: 304049

URL: http://llvm.org/viewvc/llvm-project?rev=304049&view=rev
Log:
BranchRelaxation: computeLiveIns() after creating new block

One case in BranchRelaxation did not compute liveins after creating a
new block. This is catched by existing tests with an upcoming commit
that will improve MachineVerifier checking of livein lists.

Modified:
    llvm/trunk/lib/CodeGen/BranchRelaxation.cpp

Modified: llvm/trunk/lib/CodeGen/BranchRelaxation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchRelaxation.cpp?rev=304049&r1=304048&r2=304049&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchRelaxation.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchRelaxation.cpp Fri May 26 19:53:48 2017
@@ -345,6 +345,10 @@ bool BranchRelaxation::fixupConditionalB
     // Do it here since if there's no split, no update is needed.
     MBB->replaceSuccessor(FBB, &NewBB);
     NewBB.addSuccessor(FBB);
+
+    // Need to fix live-in lists if we track liveness.
+    if (TRI->trackLivenessAfterRegAlloc(*MF))
+      computeLiveIns(LiveRegs, MF->getRegInfo(), NewBB);
   }
 
   // We now have an appropriate fall-through block in place (either naturally or




More information about the llvm-commits mailing list