summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2013-02-12 03:49:20 +0000
committerCameron Zwarich <zwarich@apple.com>2013-02-12 03:49:20 +0000
commitdd58fa4869f9bff909720aaa428487a20fab1391 (patch)
treecef58151d341cdd826ec0953bd84e5998ff05880 /lib/CodeGen/MachineBasicBlock.cpp
parentdbf10c4349bb746e6120ff1195c1ce7e21bebf93 (diff)
downloadllvm-dd58fa4869f9bff909720aaa428487a20fab1391.tar.gz
llvm-dd58fa4869f9bff909720aaa428487a20fab1391.tar.bz2
llvm-dd58fa4869f9bff909720aaa428487a20fab1391.tar.xz
Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
a critical edge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp
index 71d59f0b4b..df1c7c2a66 100644
--- a/lib/CodeGen/MachineBasicBlock.cpp
+++ b/lib/CodeGen/MachineBasicBlock.cpp
@@ -664,8 +664,12 @@ MachineBasicBlock::SplitCriticalEdge(MachineBasicBlock *Succ, Pass *P) {
" BB#" << getNumber()
<< " -- BB#" << NMBB->getNumber()
<< " -- BB#" << Succ->getNumber() << '\n');
+
+ LiveIntervals *LIS = P->getAnalysisIfAvailable<LiveIntervals>();
SlotIndexes *Indexes = P->getAnalysisIfAvailable<SlotIndexes>();
- if (Indexes)
+ if (LIS)
+ LIS->insertMBBInMaps(NMBB);
+ else if (Indexes)
Indexes->insertMBBInMaps(NMBB);
// On some targets like Mips, branches may kill virtual registers. Make sure
@@ -771,7 +775,7 @@ MachineBasicBlock::SplitCriticalEdge(MachineBasicBlock *Succ, Pass *P) {
LV->addNewBlock(NMBB, this, Succ);
}
- if (LiveIntervals *LIS = P->getAnalysisIfAvailable<LiveIntervals>()) {
+ if (LIS) {
// After splitting the edge and updating SlotIndexes, live intervals may be
// in one of two situations, depending on whether this block was the last in
// the function. If the original block was the last in the function, all live