mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Delete getMultiUseBlocks and splitSingleBlocks.
These functions are no longer used, and they are easily replaced with a loop calling shouldSplitSingleBlock and splitSingleBlock. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3ef7f6b97
commit
75e28f74b0
@ -1105,22 +1105,6 @@ bool SplitAnalysis::shouldSplitSingleBlock(const BlockInfo &BI,
|
||||
return isOriginalEndpoint(BI.FirstInstr);
|
||||
}
|
||||
|
||||
/// getMultiUseBlocks - if CurLI has more than one use in a basic block, it
|
||||
/// may be an advantage to split CurLI for the duration of the block.
|
||||
bool SplitAnalysis::getMultiUseBlocks(BlockPtrSet &Blocks) {
|
||||
// If CurLI is local to one block, there is no point to splitting it.
|
||||
if (UseBlocks.size() <= 1)
|
||||
return false;
|
||||
// Add blocks with multiple uses.
|
||||
for (unsigned i = 0, e = UseBlocks.size(); i != e; ++i) {
|
||||
const BlockInfo &BI = UseBlocks[i];
|
||||
if (BI.FirstInstr == BI.LastInstr)
|
||||
continue;
|
||||
Blocks.insert(BI.MBB);
|
||||
}
|
||||
return !Blocks.empty();
|
||||
}
|
||||
|
||||
void SplitEditor::splitSingleBlock(const SplitAnalysis::BlockInfo &BI) {
|
||||
openIntv();
|
||||
SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB->getNumber());
|
||||
@ -1136,19 +1120,6 @@ void SplitEditor::splitSingleBlock(const SplitAnalysis::BlockInfo &BI) {
|
||||
}
|
||||
}
|
||||
|
||||
/// splitSingleBlocks - Split CurLI into a separate live interval inside each
|
||||
/// basic block in Blocks.
|
||||
void SplitEditor::splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks) {
|
||||
DEBUG(dbgs() << " splitSingleBlocks for " << Blocks.size() << " blocks.\n");
|
||||
ArrayRef<SplitAnalysis::BlockInfo> UseBlocks = SA.getUseBlocks();
|
||||
for (unsigned i = 0; i != UseBlocks.size(); ++i) {
|
||||
const SplitAnalysis::BlockInfo &BI = UseBlocks[i];
|
||||
if (Blocks.count(BI.MBB))
|
||||
splitSingleBlock(BI);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Global Live Range Splitting Support
|
||||
|
@ -194,11 +194,6 @@ public:
|
||||
/// @param BI The block to be isolated.
|
||||
/// @param SingleInstrs True when single instructions should be isolated.
|
||||
bool shouldSplitSingleBlock(const BlockInfo &BI, bool SingleInstrs) const;
|
||||
|
||||
/// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from
|
||||
/// having CurLI split to a new live interval. Return true if Blocks can be
|
||||
/// passed to SplitEditor::splitSingleBlocks.
|
||||
bool getMultiUseBlocks(BlockPtrSet &Blocks);
|
||||
};
|
||||
|
||||
|
||||
@ -433,10 +428,6 @@ public:
|
||||
/// split, and doesn't call finish().
|
||||
void splitSingleBlock(const SplitAnalysis::BlockInfo &BI);
|
||||
|
||||
/// splitSingleBlocks - Split CurLI into a separate live interval inside each
|
||||
/// basic block in Blocks.
|
||||
void splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks);
|
||||
|
||||
/// splitLiveThroughBlock - Split CurLI in the given block such that it
|
||||
/// enters the block in IntvIn and leaves it in IntvOut. There may be uses in
|
||||
/// the block, but they will be ignored when placing split points.
|
||||
|
Loading…
Reference in New Issue
Block a user