summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-06-15 17:16:12 +0000
committerAndrew Trick <atrick@apple.com>2011-06-15 17:16:12 +0000
commit3013b6ae4ac3a6a141483fd5af7b0995ffb8dcec (patch)
tree1bf327d788e68530283c28edea176108273b4e06 /llvm/lib/CodeGen/ScheduleDAG.cpp
parent19a1f425a7f122f5c1734e213d8f7c90a13c68bb (diff)
downloadbcm5719-llvm-3013b6ae4ac3a6a141483fd5af7b0995ffb8dcec.tar.gz
bcm5719-llvm-3013b6ae4ac3a6a141483fd5af7b0995ffb8dcec.zip
Added -stress-sched flag in the Asserts build.
Added a test case for handling physreg aliases during pre-RA-sched. llvm-svn: 133063
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAG.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp
index 1302395f423..f3284939368 100644
--- a/llvm/lib/CodeGen/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAG.cpp
@@ -19,17 +19,27 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <climits>
using namespace llvm;
+#ifndef NDEBUG
+cl::opt<bool> StressSchedOpt(
+ "stress-sched", cl::Hidden, cl::init(false),
+ cl::desc("Stress test instruction scheduling"));
+#endif
+
ScheduleDAG::ScheduleDAG(MachineFunction &mf)
: TM(mf.getTarget()),
TII(TM.getInstrInfo()),
TRI(TM.getRegisterInfo()),
MF(mf), MRI(mf.getRegInfo()),
EntrySU(), ExitSU() {
+#ifndef NDEBUG
+ StressSched = StressSchedOpt;
+#endif
}
ScheduleDAG::~ScheduleDAG() {}
@@ -307,6 +317,8 @@ void SUnit::dumpAll(const ScheduleDAG *G) const {
if (I->isArtificial())
dbgs() << " *";
dbgs() << ": Latency=" << I->getLatency();
+ if (I->isAssignedRegDep())
+ dbgs() << " Reg=" << G->TRI->getName(I->getReg());
dbgs() << "\n";
}
}
OpenPOWER on IntegriCloud