summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocBasic.cpp
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2017-09-15 07:47:38 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2017-09-15 07:47:38 +0000
commit6188f326eb126dbe1f56cd945fc302715a2a67b8 (patch)
treec3a57a9872e4881d609746814d18e44453d98532 /llvm/lib/CodeGen/RegAllocBasic.cpp
parente2358b53bc09d8722533797e58f178e91e51d8b1 (diff)
downloadbcm5719-llvm-6188f326eb126dbe1f56cd945fc302715a2a67b8.tar.gz
bcm5719-llvm-6188f326eb126dbe1f56cd945fc302715a2a67b8.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBasic.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp
index 774306154a8..5ecde0c9d9f 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.cpp
+++ b/llvm/lib/CodeGen/RegAllocBasic.cpp
@@ -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;
}
OpenPOWER on IntegriCloud