[llvm] r295777 - [AArch64, X86] Add statistics for the MacroFusion pass
Evandro Menezes via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 14:16:13 PST 2017
Author: evandro
Date: Tue Feb 21 16:16:13 2017
New Revision: 295777
URL: http://llvm.org/viewvc/llvm-project?rev=295777&view=rev
Log:
[AArch64, X86] Add statistics for the MacroFusion pass
Modified:
llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp
llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp?rev=295777&r1=295776&r2=295777&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64MacroFusion.cpp Tue Feb 21 16:16:13 2017
@@ -14,11 +14,14 @@
#include "AArch64MacroFusion.h"
#include "AArch64Subtarget.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetInstrInfo.h"
#define DEBUG_TYPE "misched"
+STATISTIC(NumFused, "Number of instr pairs fused");
+
using namespace llvm;
static cl::opt<bool> EnableMacroFusion("aarch64-misched-fusion", cl::Hidden,
@@ -205,6 +208,7 @@ static bool scheduleAdjacentImpl(Schedul
if (Dep.getSUnit() == ASU)
Dep.setLatency(0);
+ ++NumFused;
DEBUG(dbgs() << "Macro fuse ";
Preds ? BSU->print(dbgs(), DAG) : ASU->print(dbgs(), DAG);
dbgs() << " - ";
Modified: llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MacroFusion.cpp?rev=295777&r1=295776&r2=295777&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MacroFusion.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MacroFusion.cpp Tue Feb 21 16:16:13 2017
@@ -14,11 +14,14 @@
#include "X86MacroFusion.h"
#include "X86Subtarget.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetInstrInfo.h"
#define DEBUG_TYPE "misched"
+STATISTIC(NumFused, "Number of instr pairs fused");
+
using namespace llvm;
static cl::opt<bool> EnableMacroFusion("x86-misched-fusion", cl::Hidden,
@@ -245,6 +248,7 @@ void X86MacroFusion::apply(ScheduleDAGIn
if (SuccDep.getSUnit() == &ExitSU)
SuccDep.setLatency(0);
+ ++NumFused;
DEBUG(dbgs() << "Macro fuse ";
SU.print(dbgs(), DAG);
dbgs() << " - ExitSU" << '\n');
More information about the llvm-commits
mailing list