mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Use std::vector instead of a hard-coded array. The length of that array could
get *very* large, but we only need it to be the size of thenumber of pregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -34,6 +34,9 @@ CriticalAntiDepBreaker(MachineFunction& MFi) :
|
||||
TRI(MF.getTarget().getRegisterInfo()),
|
||||
AllocatableSet(TRI->getAllocatableSet(MF))
|
||||
{
|
||||
Classes.reserve(TRI->getNumRegs());
|
||||
KillIndices.reserve(TRI->getNumRegs());
|
||||
DefIndices.reserve(TRI->getNumRegs());
|
||||
}
|
||||
|
||||
CriticalAntiDepBreaker::~CriticalAntiDepBreaker() {
|
||||
@@ -41,8 +44,7 @@ CriticalAntiDepBreaker::~CriticalAntiDepBreaker() {
|
||||
|
||||
void CriticalAntiDepBreaker::StartBlock(MachineBasicBlock *BB) {
|
||||
// Clear out the register class data.
|
||||
std::fill(Classes, array_endof(Classes),
|
||||
static_cast<const TargetRegisterClass *>(0));
|
||||
Classes.clear();
|
||||
|
||||
// Initialize the indices to indicate that no registers are live.
|
||||
const unsigned BBSize = BB->size();
|
||||
|
||||
Reference in New Issue
Block a user