summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StrongPHIElimination.cpp
diff options
context:
space:
mode:
authorMark Lacey <mark.lacey@apple.com>2013-08-14 23:50:16 +0000
committerMark Lacey <mark.lacey@apple.com>2013-08-14 23:50:16 +0000
commit9d8103de7ace78b609c3320244f38240c1299374 (patch)
tree50b186c1cbb8d07b97b50aa34b684059c4984a3a /llvm/lib/CodeGen/StrongPHIElimination.cpp
parentc3f912b945ce6813e874b7a11c29ea2b3f2b54ff (diff)
downloadbcm5719-llvm-9d8103de7ace78b609c3320244f38240c1299374.tar.gz
bcm5719-llvm-9d8103de7ace78b609c3320244f38240c1299374.zip
Auto-compute live intervals on demand.
When new virtual registers are created during splitting/spilling, defer creation of the live interval until we need to use the live interval. Along with the recent commits to notify LiveRangeEdit when new virtual registers are created, this makes it possible for functions like TargetInstrInfo::loadRegFromStackSlot() and TargetInstrInfo::storeRegToStackSlot() to create multiple virtual registers as part of the process of generating loads/stores for different register classes, and then have the live intervals for those new registers computed when they are needed. llvm-svn: 188437
Diffstat (limited to 'llvm/lib/CodeGen/StrongPHIElimination.cpp')
-rw-r--r--llvm/lib/CodeGen/StrongPHIElimination.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp
index b337c539334..d8b287f737a 100644
--- a/llvm/lib/CodeGen/StrongPHIElimination.cpp
+++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp
@@ -772,7 +772,7 @@ void StrongPHIElimination::InsertCopiesForPHI(MachineInstr *PHI,
// Add the region from the beginning of MBB to the copy instruction to
// CopyReg's live interval, and give the VNInfo the phidef flag.
- LiveInterval &CopyLI = LI->getOrCreateInterval(CopyReg);
+ LiveInterval &CopyLI = LI->createEmptyInterval(CopyReg);
SlotIndex MBBStartIndex = LI->getMBBStartIdx(MBB);
SlotIndex DestCopyIndex = LI->getInstructionIndex(CopyInstr);
VNInfo *CopyVNI = CopyLI.getNextValue(MBBStartIndex,
@@ -783,7 +783,7 @@ void StrongPHIElimination::InsertCopiesForPHI(MachineInstr *PHI,
// Adjust DestReg's live interval to adjust for its new definition at
// CopyInstr.
- LiveInterval &DestLI = LI->getOrCreateInterval(DestReg);
+ LiveInterval &DestLI = LI->createEmptyInterval(DestReg);
SlotIndex PHIIndex = LI->getInstructionIndex(PHI);
DestLI.removeRange(PHIIndex.getRegSlot(), DestCopyIndex.getRegSlot());
OpenPOWER on IntegriCloud