mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Eliminate data relocations by using NULL instead of global empty list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -525,9 +525,11 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
|
||||
// Loop over the implicit uses, making sure that they are at the head of the
|
||||
// use order list, so they don't get reallocated.
|
||||
for (const unsigned *ImplicitUses = TID.ImplicitUses;
|
||||
*ImplicitUses; ++ImplicitUses)
|
||||
MarkPhysRegRecentlyUsed(*ImplicitUses);
|
||||
if (TID.ImplicitUses) {
|
||||
for (const unsigned *ImplicitUses = TID.ImplicitUses;
|
||||
*ImplicitUses; ++ImplicitUses)
|
||||
MarkPhysRegRecentlyUsed(*ImplicitUses);
|
||||
}
|
||||
|
||||
// Get the used operands into registers. This has the potential to spill
|
||||
// incoming values if we are out of registers. Note that we completely
|
||||
@ -587,19 +589,21 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
}
|
||||
|
||||
// Loop over the implicit defs, spilling them as well.
|
||||
for (const unsigned *ImplicitDefs = TID.ImplicitDefs;
|
||||
*ImplicitDefs; ++ImplicitDefs) {
|
||||
unsigned Reg = *ImplicitDefs;
|
||||
spillPhysReg(MBB, MI, Reg, true);
|
||||
PhysRegsUseOrder.push_back(Reg);
|
||||
PhysRegsUsed[Reg] = 0; // It is free and reserved now
|
||||
PhysRegsEverUsed[Reg] = true;
|
||||
if (TID.ImplicitDefs) {
|
||||
for (const unsigned *ImplicitDefs = TID.ImplicitDefs;
|
||||
*ImplicitDefs; ++ImplicitDefs) {
|
||||
unsigned Reg = *ImplicitDefs;
|
||||
spillPhysReg(MBB, MI, Reg, true);
|
||||
PhysRegsUseOrder.push_back(Reg);
|
||||
PhysRegsUsed[Reg] = 0; // It is free and reserved now
|
||||
PhysRegsEverUsed[Reg] = true;
|
||||
|
||||
for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg);
|
||||
*AliasSet; ++AliasSet) {
|
||||
PhysRegsUseOrder.push_back(*AliasSet);
|
||||
PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now
|
||||
PhysRegsEverUsed[*AliasSet] = true;
|
||||
for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg);
|
||||
*AliasSet; ++AliasSet) {
|
||||
PhysRegsUseOrder.push_back(*AliasSet);
|
||||
PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now
|
||||
PhysRegsEverUsed[*AliasSet] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user