[llvm-commits] [llvm] r47710 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Evan Cheng
evan.cheng at apple.com
Wed Feb 27 23:40:24 PST 2008
Author: evancheng
Date: Thu Feb 28 01:40:24 2008
New Revision: 47710
URL: http://llvm.org/viewvc/llvm-project?rev=47710&view=rev
Log:
Keep track how many commutes are performed by the scheduler.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=47710&r1=47709&r2=47710&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Thu Feb 28 01:40:24 2008
@@ -24,10 +24,13 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetLowering.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
using namespace llvm;
+STATISTIC(NumCommutes, "Number of instructions commuted");
+
ScheduleDAG::ScheduleDAG(SelectionDAG &dag, MachineBasicBlock *bb,
const TargetMachine &tm)
: DAG(dag), BB(bb), TM(tm), RegInfo(BB->getParent()->getRegInfo()) {
@@ -733,6 +736,7 @@
delete MI;
MI = NewMI;
}
+ ++NumCommutes;
}
}
More information about the llvm-commits
mailing list