forked from OSchip/llvm-project
Recommit "[RegAlloc] Make sure live-ranges reflect the state of the IR when
removing them" This was temporarily reverted, but now that the fix has been commited (r313197) it should be put back in place. https://bugs.llvm.org/show_bug.cgi?id=34502 This reverts commit 9ef93d9dc4c51568e858cf8203cd2c5ce8dca796. llvm-svn: 313349
This commit is contained in:
parent
e2358b53bc
commit
6188f326eb
|
@ -143,14 +143,17 @@ INITIALIZE_PASS_END(RABasic, "regallocbasic", "Basic Register Allocator", false,
|
|||
false)
|
||||
|
||||
bool RABasic::LRE_CanEraseVirtReg(unsigned VirtReg) {
|
||||
LiveInterval &LI = LIS->getInterval(VirtReg);
|
||||
if (VRM->hasPhys(VirtReg)) {
|
||||
LiveInterval &LI = LIS->getInterval(VirtReg);
|
||||
Matrix->unassign(LI);
|
||||
aboutToRemoveInterval(LI);
|
||||
return true;
|
||||
}
|
||||
// Unassigned virtreg is probably in the priority queue.
|
||||
// RegAllocBase will erase it after dequeueing.
|
||||
// Nonetheless, clear the live-range so that the debug
|
||||
// dump will show the right state for that VirtReg.
|
||||
LI.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -546,14 +546,17 @@ void RAGreedy::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
bool RAGreedy::LRE_CanEraseVirtReg(unsigned VirtReg) {
|
||||
LiveInterval &LI = LIS->getInterval(VirtReg);
|
||||
if (VRM->hasPhys(VirtReg)) {
|
||||
LiveInterval &LI = LIS->getInterval(VirtReg);
|
||||
Matrix->unassign(LI);
|
||||
aboutToRemoveInterval(LI);
|
||||
return true;
|
||||
}
|
||||
// Unassigned virtreg is probably in the priority queue.
|
||||
// RegAllocBase will erase it after dequeueing.
|
||||
// Nonetheless, clear the live-range so that the debug
|
||||
// dump will show the right state for that VirtReg.
|
||||
LI.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue