summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocBase.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-08-24 13:37:55 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-08-24 13:37:55 +0000
commita7ed090bba0261162ed1dd018be8a25ec4ba0f81 (patch)
treece58b1afde5d6dbeb5977378877c62c9be41b114 /llvm/lib/CodeGen/RegAllocBase.cpp
parentf114820912b8484a9b40429dd58dd829a87d8c58 (diff)
downloadbcm5719-llvm-a7ed090bba0261162ed1dd018be8a25ec4ba0f81.tar.gz
bcm5719-llvm-a7ed090bba0261162ed1dd018be8a25ec4ba0f81.zip
Create subranges for new intervals resulting from live interval splitting
The register allocator can split a live interval of a register into a set of smaller intervals. After the allocation of registers is complete, the rewriter will modify the IR to replace virtual registers with the corres- ponding physical registers. At this stage, if a register corresponding to a subregister of a virtual register is used, the rewriter will check if that subregister is undefined, and if so, it will add the <undef> flag to the machine operand. The function verifying liveness of the subregis- ter would assume that it is undefined, unless any of the subranges of the live interval proves otherwise. The problem is that the live intervals created during splitting do not have any subranges, even if the original parent interval did. This could result in the <undef> flag placed on a register that is actually defined. Differential Revision: http://reviews.llvm.org/D21189 llvm-svn: 279625
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBase.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp
index 93eeb9cba45..c204665dfd5 100644
--- a/llvm/lib/CodeGen/RegAllocBase.cpp
+++ b/llvm/lib/CodeGen/RegAllocBase.cpp
@@ -143,6 +143,7 @@ void RegAllocBase::allocatePhysRegs() {
continue;
}
DEBUG(dbgs() << "queuing new interval: " << *SplitVirtReg << "\n");
+ assert(!SplitVirtReg->empty() && "expecting non-empty interval");
assert(TargetRegisterInfo::isVirtualRegister(SplitVirtReg->reg) &&
"expect split value in virtual register");
enqueue(SplitVirtReg);
OpenPOWER on IntegriCloud