diff options
author | Andrew Trick <atrick@apple.com> | 2011-01-21 05:51:33 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-01-21 05:51:33 +0000 |
commit | 47ff14b091ee66a4c5f159e7fb8714ca9a66d2f9 (patch) | |
tree | e1db89bb3f93d14acfd0fbc9f95b8de92ee977fd /llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | |
parent | b5e15d1907cd03ea3e1f6e6e675c31be947246a0 (diff) | |
download | bcm5719-llvm-47ff14b091ee66a4c5f159e7fb8714ca9a66d2f9.tar.gz bcm5719-llvm-47ff14b091ee66a4c5f159e7fb8714ca9a66d2f9.zip |
Convert -enable-sched-cycles and -enable-sched-hazard to -disable
flags. They are still not enable in this revision.
Added TargetInstrInfo::isZeroCost() to fix a fundamental problem with
the scheduler's model of operand latency in the selection DAG.
Generalized unit tests to work with sched-cycles.
llvm-svn: 123969
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp index 787c2712e75..15340a3f108 100644 --- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp @@ -24,11 +24,16 @@ #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/ScoreboardHazardRecognizer.h" #include "llvm/CodeGen/PseudoSourceValue.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; +static cl::opt<bool> DisableHazardRecognizer( + "disable-sched-hazard", cl::Hidden, cl::init(false), + cl::desc("Disable hazard detection during preRA scheduling")); + /// ReplaceTailWithBranchTo - Delete the instruction OldInst and everything /// after it, replacing it with an unconditional branch to NewDest. void @@ -421,7 +426,13 @@ bool TargetInstrInfoImpl::isSchedulingBoundary(const MachineInstr *MI, return false; } -// Default implementation of CreateTargetPreRAHazardRecognizer. +// Provide a global flag for disabling the PreRA hazard recognizer that targets +// may choose to honor. +bool TargetInstrInfoImpl::usePreRAHazardRecognizer() const { + return !DisableHazardRecognizer; +} + +// Default implementation of CreateTargetRAHazardRecognizer. ScheduleHazardRecognizer *TargetInstrInfoImpl:: CreateTargetHazardRecognizer(const TargetMachine *TM, const ScheduleDAG *DAG) const { |