mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Build the Hopfield network incrementally when splitting global live ranges.
It is common for large live ranges to have few basic blocks with register uses and many live-through blocks without any uses. This approach grows the Hopfield network incrementally around the use blocks, completely avoiding checking interference for some through blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -89,7 +89,10 @@ private:
|
||||
SmallVector<BlockInfo, 8> UseBlocks;
|
||||
|
||||
/// ThroughBlocks - Block numbers where CurLI is live through without uses.
|
||||
SmallVector<unsigned, 8> ThroughBlocks;
|
||||
BitVector ThroughBlocks;
|
||||
|
||||
/// NumThroughBlocks - Number of live-through blocks.
|
||||
unsigned NumThroughBlocks;
|
||||
|
||||
SlotIndex computeLastSplitPoint(unsigned Num);
|
||||
|
||||
@@ -135,9 +138,11 @@ public:
|
||||
/// where CurLI has uses.
|
||||
ArrayRef<BlockInfo> getUseBlocks() { return UseBlocks; }
|
||||
|
||||
/// getThroughBlocks - Return an array of block numbers where CurLI is live
|
||||
/// through without uses.
|
||||
ArrayRef<unsigned> getThroughBlocks() { return ThroughBlocks; }
|
||||
/// getNumThroughBlocks - Return the number of through blocks.
|
||||
unsigned getNumThroughBlocks() const { return NumThroughBlocks; }
|
||||
|
||||
/// isThroughBlock - Return true if CurLI is live through MBB without uses.
|
||||
bool isThroughBlock(unsigned MBB) const { return ThroughBlocks.test(MBB); }
|
||||
|
||||
typedef SmallPtrSet<const MachineBasicBlock*, 16> BlockPtrSet;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user