X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FTargetSubtargetInfo.cpp;h=386a813b057f7c8ca6b52e6bdbc48c50365f257c;hb=54a7f7f9e0b81327c5de1985d4eefbe7b32142af;hp=59ffdea00ea6b4a751081160d63d79406dd0ef63;hpb=5b1b4489cf3a0f56f8be0673fc5cc380a32d277b;p=oota-llvm.git diff --git a/lib/Target/TargetSubtargetInfo.cpp b/lib/Target/TargetSubtargetInfo.cpp index 59ffdea00ea..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,12 +23,39 @@ TargetSubtargetInfo::TargetSubtargetInfo() {} TargetSubtargetInfo::~TargetSubtargetInfo() {} -bool TargetSubtargetInfo::enablePostRAScheduler( - CodeGenOpt::Level OptLevel, - AntiDepBreakMode& Mode, - RegClassVector& CriticalPathRCs) const { - Mode = ANTIDEP_NONE; - CriticalPathRCs.clear(); +// 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::enableRALocalReassignment( + CodeGenOpt::Level OptLevel) const { + return true; +} + +bool TargetSubtargetInfo::enablePostMachineScheduler() const { + return getSchedModel()->PostRAScheduler; +} + +bool TargetSubtargetInfo::useAA() const { + return false; +}