mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-06 05:33:28 +00:00
Correct the allocation size for CCState's UsedRegs member, which
only needs one bit for each register. UsedRegs is a SmallVector sized at 16, so this eliminates a heap allocation/free for every call and return processed by Legalize on most targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ebd69421a2
commit
117b64b3f8
@ -26,7 +26,7 @@ CCState::CCState(unsigned CC, bool isVarArg, const TargetMachine &tm,
|
|||||||
// No stack is used.
|
// No stack is used.
|
||||||
StackOffset = 0;
|
StackOffset = 0;
|
||||||
|
|
||||||
UsedRegs.resize(TRI.getNumRegs());
|
UsedRegs.resize((TRI.getNumRegs()+31)/32);
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleByVal - Allocate a stack slot large enough to pass an argument by
|
// HandleByVal - Allocate a stack slot large enough to pass an argument by
|
||||||
|
Loading…
x
Reference in New Issue
Block a user