summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-10 20:45:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-10 20:45:07 +0000
commit3b870f045f571507c541ae386473c665ee110f3f (patch)
treef7667376cad0cd7f3a2c2b25ddc430c5b760de64
parent62e721478bdedfc1147f053cb5379852c139df30 (diff)
downloadbcm5719-llvm-3b870f045f571507c541ae386473c665ee110f3f.tar.gz
bcm5719-llvm-3b870f045f571507c541ae386473c665ee110f3f.zip
Avoid editing the current live interval during remat.
The live interval may be used for a spill slot as well, and that spill slot could be shared by split registers. We cannot shrink it, even if we know the current register won't need the spill slot in that range. llvm-svn: 110721
-rw-r--r--llvm/lib/CodeGen/InlineSpiller.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index 5ac66105d89..63a89aa90d1 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -270,7 +270,7 @@ void InlineSpiller::reMaterializeAll() {
lis_.RemoveMachineInstrFromMaps(DefMI);
vrm_.RemoveMachineInstrFromMaps(DefMI);
DefMI->eraseFromParent();
- li_->removeValNo(VNI);
+ VNI->setIsDefAccurate(false);
anyRemoved = true;
}
@@ -286,8 +286,8 @@ void InlineSpiller::reMaterializeAll() {
MachineBasicBlock::iterator NextMI = MI;
++NextMI;
if (NextMI != MI->getParent()->end() && !lis_.isNotInMIMap(NextMI)) {
- SlotIndex NearIdx = lis_.getInstructionIndex(NextMI);
- if (li_->liveAt(NearIdx))
+ VNInfo *VNI = li_->getVNInfoAt(lis_.getInstructionIndex(NextMI));
+ if (VNI && (VNI->hasPHIKill() || usedValues_.count(VNI)))
continue;
}
DEBUG(dbgs() << "Removing debug info due to remat:" << "\t" << *MI);
OpenPOWER on IntegriCloud