diff options
author | Cameron Zwarich <zwarich@apple.com> | 2013-02-12 03:49:20 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-12 03:49:20 +0000 |
commit | cdcab38ff5d0f5fad15f173d533077f552c59b85 (patch) | |
tree | a5a6bb043f589d4e4b39ab4b362b687a89110b38 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | af34931c638ebb902dfac99942e564e5a0ed8521 (diff) | |
download | llvm-cdcab38ff5d0f5fad15f173d533077f552c59b85.zip llvm-cdcab38ff5d0f5fad15f173d533077f552c59b85.tar.gz llvm-cdcab38ff5d0f5fad15f173d533077f552c59b85.tar.bz2 |
Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
a critical edge.
llvm-svn: 174936
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 71d59f0..df1c7c2 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/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 |