forked from OSchip/llvm-project
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
This commit is contained in:
parent
c201d8a999
commit
71a3a003dd
|
@ -812,9 +812,9 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg,
|
||||||
tie(Start, Stop) = Indexes->getMBBRange(BI.MBB);
|
tie(Start, Stop) = Indexes->getMBBRange(BI.MBB);
|
||||||
Intf.moveToBlock(BI.MBB->getNumber());
|
Intf.moveToBlock(BI.MBB->getNumber());
|
||||||
DEBUG(dbgs() << "EB#" << Bundles->getBundle(BI.MBB->getNumber(), 0)
|
DEBUG(dbgs() << "EB#" << Bundles->getBundle(BI.MBB->getNumber(), 0)
|
||||||
<< (RegIn ? " => " : " -- ")
|
<< (BI.LiveIn ? (RegIn ? " => " : " -> ") : " ")
|
||||||
<< "BB#" << BI.MBB->getNumber()
|
<< "BB#" << BI.MBB->getNumber()
|
||||||
<< (RegOut ? " => " : " -- ")
|
<< (BI.LiveOut ? (RegOut ? " => " : " -> ") : " ")
|
||||||
<< " EB#" << Bundles->getBundle(BI.MBB->getNumber(), 1)
|
<< " EB#" << Bundles->getBundle(BI.MBB->getNumber(), 1)
|
||||||
<< " [" << Start << ';'
|
<< " [" << Start << ';'
|
||||||
<< SA->getLastSplitPoint(BI.MBB->getNumber()) << '-' << Stop
|
<< SA->getLastSplitPoint(BI.MBB->getNumber()) << '-' << Stop
|
||||||
|
@ -1062,7 +1062,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg,
|
||||||
// |---o-- Live-in in MainIntv.
|
// |---o-- Live-in in MainIntv.
|
||||||
// ====--- Switch to LocalIntv before interference.
|
// ====--- 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");
|
assert(Switch <= Intf.first() && "Expected to avoid interference");
|
||||||
SE->useIntv(Switch, Pos);
|
SE->useIntv(Switch, Pos);
|
||||||
SE->selectIntv(MainIntv);
|
SE->selectIntv(MainIntv);
|
||||||
|
@ -1080,7 +1080,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg,
|
||||||
// | o-- Defined in block.
|
// | o-- Defined in block.
|
||||||
// --- Begin LocalIntv at first use.
|
// --- Begin LocalIntv at first use.
|
||||||
//
|
//
|
||||||
SlotIndex Switch = SE->enterIntvBefore(BI.FirstUse);
|
SlotIndex Switch = SE->enterIntvBefore(std::min(Pos, BI.FirstUse));
|
||||||
SE->useIntv(Switch, Pos);
|
SE->useIntv(Switch, Pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue