mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -463,11 +463,11 @@ VNInfo *SplitEditor::defFromParent(unsigned RegIdx,
|
||||
unsigned SplitEditor::openIntv() {
|
||||
// Create the complement as index 0.
|
||||
if (Edit->empty())
|
||||
Edit->create();
|
||||
Edit->createEmptyInterval();
|
||||
|
||||
// Create the open interval.
|
||||
OpenIdx = Edit->size();
|
||||
Edit->create();
|
||||
Edit->createEmptyInterval();
|
||||
return OpenIdx;
|
||||
}
|
||||
|
||||
@@ -1116,7 +1116,7 @@ void SplitEditor::finish(SmallVectorImpl<unsigned> *LRMap) {
|
||||
SmallVector<LiveInterval*, 8> dups;
|
||||
dups.push_back(li);
|
||||
for (unsigned j = 1; j != NumComp; ++j)
|
||||
dups.push_back(&Edit->create());
|
||||
dups.push_back(&Edit->createEmptyInterval());
|
||||
ConEQ.Distribute(&dups[0], MRI);
|
||||
// The new intervals all map back to i.
|
||||
if (LRMap)
|
||||
|
||||
Reference in New Issue
Block a user