summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
diff options
context:
space:
mode:
authorEvandro Menezes <e.menezes@samsung.com>2017-03-10 20:20:04 +0000
committerEvandro Menezes <e.menezes@samsung.com>2017-03-10 20:20:04 +0000
commit8f70e249a7a39637a6d8937f1ecd75046e52a264 (patch)
tree21bdf58465cddf91f522b516f2254df83aca9226 /llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
parent14dcf02fcbfad489ea6dbfd1199d54e79413c5af (diff)
downloadbcm5719-llvm-8f70e249a7a39637a6d8937f1ecd75046e52a264.tar.gz
bcm5719-llvm-8f70e249a7a39637a6d8937f1ecd75046e52a264.zip
[AArch64, X86] Additional debug information for MacroFusion
In order to make it easier to parse information about the performance of MacroFusion, this patch adds the function and the instruction names to the debug output of this pass. llvm-svn: 297504
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64MacroFusion.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64MacroFusion.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp b/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
index 364016e8203..1cac19b8139 100644
--- a/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
+++ b/llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
@@ -209,11 +209,19 @@ static bool scheduleAdjacentImpl(ScheduleDAGMI *DAG, SUnit *ASU,
Dep.setLatency(0);
++NumFused;
- DEBUG(dbgs() << "Macro fuse ";
- Preds ? BSU->print(dbgs(), DAG) : ASU->print(dbgs(), DAG);
- dbgs() << " - ";
- Preds ? ASU->print(dbgs(), DAG) : BSU->print(dbgs(), DAG);
- dbgs() << '\n');
+ DEBUG({ SUnit *LSU = Preds ? BSU : ASU;
+ SUnit *RSU = Preds ? ASU : BSU;
+ const MachineInstr *LMI = Preds ? BMI : AMI;
+ const MachineInstr *RMI = Preds ? AMI : BMI;
+
+ dbgs() << DAG->MF.getName() << "(): Macro fuse ";
+ LSU->print(dbgs(), DAG);
+ dbgs() << " - ";
+ RSU->print(dbgs(), DAG);
+ dbgs() << " / " <<
+ TII->getName(LMI->getOpcode()) << " - " <<
+ TII->getName(RMI->getOpcode()) << '\n';
+ });
return true;
}
OpenPOWER on IntegriCloud