mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
RegAllocLocal can count copies too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
23ead99283
commit
ab2d00863f
@ -37,6 +37,7 @@ using namespace llvm;
|
||||
|
||||
STATISTIC(NumStores, "Number of stores added");
|
||||
STATISTIC(NumLoads , "Number of loads added");
|
||||
STATISTIC(NumCopies, "Number of copies coalesced");
|
||||
|
||||
static RegisterRegAlloc
|
||||
localRegAlloc("local", "local register allocator",
|
||||
@ -1156,8 +1157,10 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
if (TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg,
|
||||
SrcCopySubReg, DstCopySubReg) &&
|
||||
SrcCopyReg == DstCopyReg && SrcCopySubReg == DstCopySubReg &&
|
||||
DeadDefs.empty())
|
||||
DeadDefs.empty()) {
|
||||
++NumCopies;
|
||||
MBB.erase(MI);
|
||||
}
|
||||
}
|
||||
|
||||
MachineBasicBlock::iterator MI = MBB.getFirstTerminator();
|
||||
|
Loading…
x
Reference in New Issue
Block a user