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/ScoreboardHazardRecognizer.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/ScoreboardHazardRecognizer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp b/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp index b00e0cd0998..e6d7ded8a78 100644 --- a/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp +++ b/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp @@ -19,6 +19,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetInstrItineraries.h" using namespace llvm; @@ -170,14 +171,17 @@ void ScoreboardHazardRecognizer::EmitInstruction(SUnit *SU) { if (!ItinData || ItinData->isEmpty()) return; - ++IssueCount; - - unsigned cycle = 0; - // Use the itinerary for the underlying instruction to reserve FU's // in the scoreboard at the appropriate future cycles. const TargetInstrDesc *TID = DAG->getInstrDesc(SU); assert(TID && "The scheduler must filter non-machineinstrs"); + if (DAG->TII->isZeroCost(TID->Opcode)) + return; + + ++IssueCount; + + unsigned cycle = 0; + unsigned idx = TID->getSchedClass(); for (const InstrStage *IS = ItinData->beginStage(idx), *E = ItinData->endStage(idx); IS != E; ++IS) { |