summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-04 00:05:28 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-04 00:05:28 +0000
commit71a3a003dd9856c789a3d39e2235acb38167e550 (patch)
tree601f870a27bb732136ab00ed902ffc43f591e429 /llvm/lib
parentc201d8a999487c2ef8e65178ab9a6ba0073c0ca0 (diff)
downloadbcm5719-llvm-71a3a003dd9856c789a3d39e2235acb38167e550.tar.gz
bcm5719-llvm-71a3a003dd9856c789a3d39e2235acb38167e550.zip
Fix PR10244.
A split point inserted in a block with a landing pad successor may be hoisted above the call to ensure that it dominates all successors. The code that handles the rest of the basic block must take this into account. I am not including a test case, it would be very fragile. PR10244 comes from building clang with exceptions enabled. llvm-svn: 134369
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index 4402694d9a6..acf7f95182f 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -812,9 +812,9 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg,
tie(Start, Stop) = Indexes->getMBBRange(BI.MBB);
Intf.moveToBlock(BI.MBB->getNumber());
DEBUG(dbgs() << "EB#" << Bundles->getBundle(BI.MBB->getNumber(), 0)
- << (RegIn ? " => " : " -- ")
+ << (BI.LiveIn ? (RegIn ? " => " : " -> ") : " ")
<< "BB#" << BI.MBB->getNumber()
- << (RegOut ? " => " : " -- ")
+ << (BI.LiveOut ? (RegOut ? " => " : " -> ") : " ")
<< " EB#" << Bundles->getBundle(BI.MBB->getNumber(), 1)
<< " [" << Start << ';'
<< SA->getLastSplitPoint(BI.MBB->getNumber()) << '-' << Stop
@@ -1062,7 +1062,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg,
// |---o-- Live-in in MainIntv.
// ====--- Switch to LocalIntv before interference.
//
- SlotIndex Switch = SE->enterIntvBefore(Intf.first());
+ SlotIndex Switch = SE->enterIntvBefore(std::min(Pos, Intf.first()));
assert(Switch <= Intf.first() && "Expected to avoid interference");
SE->useIntv(Switch, Pos);
SE->selectIntv(MainIntv);
@@ -1080,7 +1080,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg,
// | o-- Defined in block.
// --- Begin LocalIntv at first use.
//
- SlotIndex Switch = SE->enterIntvBefore(BI.FirstUse);
+ SlotIndex Switch = SE->enterIntvBefore(std::min(Pos, BI.FirstUse));
SE->useIntv(Switch, Pos);
}
}
OpenPOWER on IntegriCloud