mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Add some statistics to the splitting and spilling frameworks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,6 +30,8 @@ using namespace llvm;
|
||||
|
||||
STATISTIC(NumFinished, "Number of splits finished");
|
||||
STATISTIC(NumSimple, "Number of splits that were simple");
|
||||
STATISTIC(NumCopies, "Number of copies inserted for splitting");
|
||||
STATISTIC(NumRemats, "Number of rematerialized defs for splitting");
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Split Analysis
|
||||
@@ -589,12 +591,14 @@ VNInfo *SplitEditor::defFromParent(unsigned RegIdx,
|
||||
LiveRangeEdit::Remat RM(ParentVNI);
|
||||
if (Edit->canRematerializeAt(RM, UseIdx, true, LIS)) {
|
||||
Def = Edit->rematerializeAt(MBB, I, LI->reg, RM, LIS, TII, TRI, Late);
|
||||
++NumRemats;
|
||||
} else {
|
||||
// Can't remat, just insert a copy from parent.
|
||||
CopyMI = BuildMI(MBB, I, DebugLoc(), TII.get(TargetOpcode::COPY), LI->reg)
|
||||
.addReg(Edit->getReg());
|
||||
Def = LIS.getSlotIndexes()->insertMachineInstrInMaps(CopyMI, Late)
|
||||
.getDefIndex();
|
||||
++NumCopies;
|
||||
}
|
||||
|
||||
// Define the value in Reg.
|
||||
|
||||
Reference in New Issue
Block a user