mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-14 15:25:25 +00:00
Avoid allocating the same physreg to multiple virtregs in one instruction.
While that approach works wonders for register pressure, it tends to break everything. This should unbreak the arm-linux builder and fix a number of miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -471,6 +471,7 @@ void RAFast::allocVirtReg(MachineInstr *MI, LiveRegEntry &LRE, unsigned Hint) {
|
||||
|
||||
unsigned BestReg = 0, BestCost = spillImpossible;
|
||||
for (TargetRegisterClass::iterator I = AOB; I != AOE; ++I) {
|
||||
if (UsedInInstr.test(*I)) continue;
|
||||
unsigned Cost = calcSpillCost(*I);
|
||||
// Cost is 0 when all aliases are already disabled.
|
||||
if (Cost == 0)
|
||||
|
Reference in New Issue
Block a user