mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Added temp flag -misched-bench for staging in default changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7394a7c0c2
commit
b6ac11cd03
@ -56,6 +56,9 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// \brief Temporary API to test migration to MI scheduler.
|
||||
bool useMachineScheduler() const;
|
||||
|
||||
/// \brief True if the subtarget should run MachineScheduler after aggressive
|
||||
/// coalescing.
|
||||
///
|
||||
|
@ -236,7 +236,7 @@ TargetPassConfig::TargetPassConfig(TargetMachine *tm, PassManagerBase &pm)
|
||||
|
||||
// Temporarily disable experimental passes.
|
||||
const TargetSubtargetInfo &ST = TM->getSubtarget<TargetSubtargetInfo>();
|
||||
if (!ST.enableMachineScheduler())
|
||||
if (!ST.useMachineScheduler())
|
||||
disablePass(&MachineSchedulerID);
|
||||
}
|
||||
|
||||
|
@ -2199,7 +2199,7 @@ bool RegisterCoalescer::runOnMachineFunction(MachineFunction &fn) {
|
||||
|
||||
const TargetSubtargetInfo &ST = TM->getSubtarget<TargetSubtargetInfo>();
|
||||
if (EnableGlobalCopies == cl::BOU_UNSET)
|
||||
JoinGlobalCopies = ST.enableMachineScheduler();
|
||||
JoinGlobalCopies = ST.useMachineScheduler();
|
||||
else
|
||||
JoinGlobalCopies = (EnableGlobalCopies == cl::BOU_TRUE);
|
||||
|
||||
|
@ -230,7 +230,7 @@ namespace llvm {
|
||||
const TargetLowering *TLI = IS->getTargetLowering();
|
||||
const TargetSubtargetInfo &ST = IS->TM.getSubtarget<TargetSubtargetInfo>();
|
||||
|
||||
if (OptLevel == CodeGenOpt::None || ST.enableMachineScheduler() ||
|
||||
if (OptLevel == CodeGenOpt::None || ST.useMachineScheduler() ||
|
||||
TLI->getSchedulingPreference() == Sched::Source)
|
||||
return createSourceListDAGScheduler(IS, OptLevel);
|
||||
if (TLI->getSchedulingPreference() == Sched::RegPressure)
|
||||
|
@ -11,6 +11,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
using namespace llvm;
|
||||
@ -22,6 +23,21 @@ TargetSubtargetInfo::TargetSubtargetInfo() {}
|
||||
|
||||
TargetSubtargetInfo::~TargetSubtargetInfo() {}
|
||||
|
||||
// Temporary option to compare overall performance change when moving from the
|
||||
// SD scheduler to the MachineScheduler pass pipeline. It should be removed
|
||||
// before 3.4. 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<bool> 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::enableMachineScheduler() const {
|
||||
return false;
|
||||
}
|
||||
@ -38,4 +54,3 @@ bool TargetSubtargetInfo::enablePostRAScheduler(
|
||||
bool TargetSubtargetInfo::useAA() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user