mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
LiveVariables::VarInfo contains an AliveBlocks BitVector, which has as many
entries as there are basic blocks in the function. LiveVariables::getVarInfo creates a VarInfo struct for every register in the function, leading to quadratic space use. This patch changes the BitVector to a SparseBitVector, which doesn't help the worst-case memory use but does reduce the actual use in very long functions with short-lived variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -334,8 +334,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
|
||||
|
||||
// Is it alive in this successor?
|
||||
unsigned SuccIdx = SuccMBB->getNumber();
|
||||
if (SuccIdx < InRegVI.AliveBlocks.size() &&
|
||||
InRegVI.AliveBlocks[SuccIdx]) {
|
||||
if (InRegVI.AliveBlocks.test(SuccIdx)) {
|
||||
ValueIsLive = true;
|
||||
break;
|
||||
}
|
||||
@@ -407,8 +406,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
|
||||
|
||||
// This vreg no longer lives all of the way through opBlock.
|
||||
unsigned opBlockNum = opBlock.getNumber();
|
||||
if (opBlockNum < InRegVI.AliveBlocks.size())
|
||||
InRegVI.AliveBlocks[opBlockNum] = false;
|
||||
InRegVI.AliveBlocks.reset(opBlockNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user