mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Added register reassignment prototype to RAGreedy. It's a simple
heuristic to reshuffle register assignments when we can't find an available reg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121388 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -435,15 +435,13 @@ unsigned RABasic::selectOrSplit(LiveInterval &VirtReg,
|
||||
LiveInterval *interferingVirtReg =
|
||||
Queries[interfReg].firstInterference().liveUnionPos().value();
|
||||
|
||||
// The current VirtReg must either spillable, or one of its interferences
|
||||
// The current VirtReg must either be spillable, or one of its interferences
|
||||
// must have less spill weight.
|
||||
if (interferingVirtReg->weight < VirtReg.weight ) {
|
||||
PhysRegSpillCands.push_back(PhysReg);
|
||||
}
|
||||
}
|
||||
// Try to spill another interfering reg with less spill weight.
|
||||
//
|
||||
// FIXME: RAGreedy will sort this list by spill weight.
|
||||
for (SmallVectorImpl<unsigned>::iterator PhysRegI = PhysRegSpillCands.begin(),
|
||||
PhysRegE = PhysRegSpillCands.end(); PhysRegI != PhysRegE; ++PhysRegI) {
|
||||
|
||||
|
Reference in New Issue
Block a user