Add RAGreedy methods for splitting live ranges around regions.

Analyze the live range's behavior entering and leaving basic blocks. Compute an
interference pattern for each allocation candidate, and use SpillPlacement to
find an optimal region where that register can be live.

This code is still not enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-01-18 21:13:27 +00:00
parent fdcee77887
commit b5fa933343
5 changed files with 356 additions and 1 deletions
+8
View File
@@ -50,6 +50,9 @@ public:
typedef SmallPtrSet<const MachineInstr*, 16> InstrPtrSet;
InstrPtrSet usingInstrs_;
// Sorted slot indexes of using instructions.
SmallVector<SlotIndex, 8> UseSlots;
// The number of instructions using curli in each basic block.
typedef DenseMap<const MachineBasicBlock*, unsigned> BlockCountMap;
BlockCountMap usingBlocks_;
@@ -81,6 +84,11 @@ public:
/// new interval.
void clear();
/// hasUses - Return true if MBB has any uses of curli.
bool hasUses(const MachineBasicBlock *MBB) const {
return usingBlocks_.lookup(MBB);
}
typedef SmallPtrSet<const MachineBasicBlock*, 16> BlockPtrSet;
typedef SmallPtrSet<const MachineLoop*, 16> LoopPtrSet;