X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FTargetSubtargetInfo.cpp;h=386a813b057f7c8ca6b52e6bdbc48c50365f257c;hb=96b1e70c66aa49db4ab2bcfeaefcef9c98415ad1;hp=f624c321ab44ce3126f418a948d80ac52369899f;hpb=738073c4aa474e27c9d3c991daf593bddce54718;p=oota-llvm.git diff --git a/lib/Target/TargetSubtargetInfo.cpp b/lib/Target/TargetSubtargetInfo.cpp index f624c321ab4..386a813b057 100644 --- a/lib/Target/TargetSubtargetInfo.cpp +++ b/lib/Target/TargetSubtargetInfo.cpp @@ -11,8 +11,9 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Target/TargetSubtargetInfo.h" +#include "llvm/Support/CommandLine.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/Target/TargetSubtargetInfo.h" using namespace llvm; //--------------------------------------------------------------------------- @@ -22,20 +23,39 @@ TargetSubtargetInfo::TargetSubtargetInfo() {} TargetSubtargetInfo::~TargetSubtargetInfo() {} +// Temporary option to compare overall performance change when moving from the +// SD scheduler to the MachineScheduler pass pipeline. This is convenient for +// benchmarking during the transition from SD to MI scheduling. Once armv7 makes +// the switch, it should go away. The normal way to enable/disable the +// MachineScheduling pass itself is by using -enable-misched. For targets that +// already use MI sched (via MySubTarget::enableMachineScheduler()) +// -misched-bench=false negates the subtarget hook. +static cl::opt BenchMachineSched("misched-bench", cl::Hidden, + cl::desc("Migrate from the target's default SD scheduler to MI scheduler")); + +bool TargetSubtargetInfo::useMachineScheduler() const { + if (BenchMachineSched.getNumOccurrences()) + return BenchMachineSched; + return enableMachineScheduler(); +} + +bool TargetSubtargetInfo::enableAtomicExpandLoadLinked() const { + return true; +} + bool TargetSubtargetInfo::enableMachineScheduler() const { return false; } -bool TargetSubtargetInfo::enablePostRAScheduler( - CodeGenOpt::Level OptLevel, - AntiDepBreakMode& Mode, - RegClassVector& CriticalPathRCs) const { - Mode = ANTIDEP_NONE; - CriticalPathRCs.clear(); - return false; +bool TargetSubtargetInfo::enableRALocalReassignment( + CodeGenOpt::Level OptLevel) const { + return true; +} + +bool TargetSubtargetInfo::enablePostMachineScheduler() const { + return getSchedModel()->PostRAScheduler; } bool TargetSubtargetInfo::useAA() const { return false; } -