mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Convert more loops to range-based equivalents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -321,17 +321,9 @@ PBQPRAProblem *PBQPBuilderWithCoalescing::build(MachineFunction *mf,
|
||||
|
||||
// Scan the machine function and add a coalescing cost whenever CoalescerPair
|
||||
// gives the Ok.
|
||||
for (MachineFunction::const_iterator mbbItr = mf->begin(),
|
||||
mbbEnd = mf->end();
|
||||
mbbItr != mbbEnd; ++mbbItr) {
|
||||
const MachineBasicBlock *mbb = &*mbbItr;
|
||||
|
||||
for (MachineBasicBlock::const_iterator miItr = mbb->begin(),
|
||||
miEnd = mbb->end();
|
||||
miItr != miEnd; ++miItr) {
|
||||
const MachineInstr *mi = &*miItr;
|
||||
|
||||
if (!cp.setRegisters(mi)) {
|
||||
for (const auto &mbb : *mf) {
|
||||
for (const auto &mi : mbb) {
|
||||
if (!cp.setRegisters(&mi)) {
|
||||
continue; // Not coalescable.
|
||||
}
|
||||
|
||||
@@ -346,7 +338,7 @@ PBQPRAProblem *PBQPBuilderWithCoalescing::build(MachineFunction *mf,
|
||||
// value plucked randomly out of the air.
|
||||
|
||||
PBQP::PBQPNum cBenefit =
|
||||
copyFactor * LiveIntervals::getSpillWeight(false, true, mbfi, mi);
|
||||
copyFactor * LiveIntervals::getSpillWeight(false, true, mbfi, &mi);
|
||||
|
||||
if (cp.isPhys()) {
|
||||
if (!mf->getRegInfo().isAllocatable(dst)) {
|
||||
|
Reference in New Issue
Block a user