mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Convert RegClass::IsColorUsedArr from a dynamically allocated array to
a vector. This makes asserting on array bounds easier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2731 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,7 +14,7 @@ RegClass::RegClass(const Function *M,
|
||||
if( DEBUG_RA)
|
||||
cerr << "Created Reg Class: " << RegClassID << "\n";
|
||||
|
||||
IsColorUsedArr = new bool[ Mrc->getNumOfAllRegs() ];
|
||||
IsColorUsedArr.resize(Mrc->getNumOfAllRegs());
|
||||
}
|
||||
|
||||
|
||||
@@ -200,14 +200,13 @@ void RegClass::colorIGNode(IGNode *const Node)
|
||||
|
||||
// init all elements of to IsColorUsedAr false;
|
||||
//
|
||||
for( unsigned i=0; i < MRC->getNumOfAllRegs(); i++) {
|
||||
IsColorUsedArr[ i ] = false;
|
||||
}
|
||||
for (unsigned i=0; i < MRC->getNumOfAllRegs(); i++)
|
||||
IsColorUsedArr[i] = false;
|
||||
|
||||
// init all reserved_regs to true - we can't use them
|
||||
//
|
||||
for( unsigned i=0; i < ReservedColorList->size() ; i++) {
|
||||
IsColorUsedArr[ (*ReservedColorList)[i] ] = true;
|
||||
IsColorUsedArr[(*ReservedColorList)[i]] = true;
|
||||
}
|
||||
|
||||
// initialize all colors used by neighbors of this node to true
|
||||
|
Reference in New Issue
Block a user