mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Rename TargetSubtargetInfo::enablePostMachineScheduler() to enablePostRAScheduler()
r213101 changed the behaviour of this method to not only affect the PostMachineScheduler scheduler but also the PostRAScheduler scheduler, renaming should make this fact clear. Also document that the preferred way is to specify this in the scheduling model instead of overriding this method. Differential Revision: http://reviews.llvm.org/D10427 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -115,12 +115,11 @@ public:
|
|||||||
/// can be overridden.
|
/// can be overridden.
|
||||||
virtual bool enableJoinGlobalCopies() const;
|
virtual bool enableJoinGlobalCopies() const;
|
||||||
|
|
||||||
/// \brief True if the subtarget should run PostMachineScheduler.
|
/// True if the subtarget should run a scheduler after register allocation.
|
||||||
///
|
///
|
||||||
/// This only takes effect if the target has configured the
|
/// By default this queries the PostRAScheduling bit in the scheduling model
|
||||||
/// PostMachineScheduler pass to run, or if the global cl::opt flag,
|
/// which is the preferred way to influence this.
|
||||||
/// MISchedPostRA, is set.
|
virtual bool enablePostRAScheduler() const;
|
||||||
virtual bool enablePostMachineScheduler() const;
|
|
||||||
|
|
||||||
/// \brief True if the subtarget should run the atomic expansion pass.
|
/// \brief True if the subtarget should run the atomic expansion pass.
|
||||||
virtual bool enableAtomicExpand() const;
|
virtual bool enableAtomicExpand() const;
|
||||||
|
@ -347,7 +347,7 @@ bool PostMachineScheduler::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
if (skipOptnoneFunction(*mf.getFunction()))
|
if (skipOptnoneFunction(*mf.getFunction()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!mf.getSubtarget().enablePostMachineScheduler()) {
|
if (!mf.getSubtarget().enablePostRAScheduler()) {
|
||||||
DEBUG(dbgs() << "Subtarget disables post-MI-sched.\n");
|
DEBUG(dbgs() << "Subtarget disables post-MI-sched.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ bool PostRAScheduler::enablePostRAScheduler(
|
|||||||
TargetSubtargetInfo::RegClassVector &CriticalPathRCs) const {
|
TargetSubtargetInfo::RegClassVector &CriticalPathRCs) const {
|
||||||
Mode = ST.getAntiDepBreakMode();
|
Mode = ST.getAntiDepBreakMode();
|
||||||
ST.getCriticalPathRCs(CriticalPathRCs);
|
ST.getCriticalPathRCs(CriticalPathRCs);
|
||||||
return ST.enablePostMachineScheduler() &&
|
return ST.enablePostRAScheduler() &&
|
||||||
OptLevel >= ST.getOptLevelToEnablePostRAScheduler();
|
OptLevel >= ST.getOptLevelToEnablePostRAScheduler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public:
|
|||||||
}
|
}
|
||||||
const Triple &getTargetTriple() const { return TargetTriple; }
|
const Triple &getTargetTriple() const { return TargetTriple; }
|
||||||
bool enableMachineScheduler() const override { return true; }
|
bool enableMachineScheduler() const override { return true; }
|
||||||
bool enablePostMachineScheduler() const override {
|
bool enablePostRAScheduler() const override {
|
||||||
return isCortexA53() || isCortexA57();
|
return isCortexA53() || isCortexA57();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ bool ARMSubtarget::hasSinCos() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This overrides the PostRAScheduler bit in the SchedModel for any CPU.
|
// This overrides the PostRAScheduler bit in the SchedModel for any CPU.
|
||||||
bool ARMSubtarget::enablePostMachineScheduler() const {
|
bool ARMSubtarget::enablePostRAScheduler() const {
|
||||||
return (!isThumb() || hasThumb2());
|
return (!isThumb() || hasThumb2());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ public:
|
|||||||
bool hasSinCos() const;
|
bool hasSinCos() const;
|
||||||
|
|
||||||
/// True for some subtargets at > -O0.
|
/// True for some subtargets at > -O0.
|
||||||
bool enablePostMachineScheduler() const override;
|
bool enablePostRAScheduler() const override;
|
||||||
|
|
||||||
// enableAtomicExpand- True if we need to expand our atomics.
|
// enableAtomicExpand- True if we need to expand our atomics.
|
||||||
bool enableAtomicExpand() const override;
|
bool enableAtomicExpand() const override;
|
||||||
|
@ -126,7 +126,7 @@ MipsSubtarget::MipsSubtarget(const Triple &TT, const std::string &CPU,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// This overrides the PostRAScheduler bit in the SchedModel for any CPU.
|
/// This overrides the PostRAScheduler bit in the SchedModel for any CPU.
|
||||||
bool MipsSubtarget::enablePostMachineScheduler() const { return true; }
|
bool MipsSubtarget::enablePostRAScheduler() const { return true; }
|
||||||
|
|
||||||
void MipsSubtarget::getCriticalPathRCs(RegClassVector &CriticalPathRCs) const {
|
void MipsSubtarget::getCriticalPathRCs(RegClassVector &CriticalPathRCs) const {
|
||||||
CriticalPathRCs.clear();
|
CriticalPathRCs.clear();
|
||||||
|
@ -147,7 +147,7 @@ class MipsSubtarget : public MipsGenSubtargetInfo {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/// This overrides the PostRAScheduler bit in the SchedModel for each CPU.
|
/// This overrides the PostRAScheduler bit in the SchedModel for each CPU.
|
||||||
bool enablePostMachineScheduler() const override;
|
bool enablePostRAScheduler() const override;
|
||||||
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override;
|
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override;
|
||||||
CodeGenOpt::Level getOptLevelToEnablePostRAScheduler() const override;
|
CodeGenOpt::Level getOptLevelToEnablePostRAScheduler() const override;
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ bool PPCSubtarget::enableMachineScheduler() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This overrides the PostRAScheduler bit in the SchedModel for each CPU.
|
// This overrides the PostRAScheduler bit in the SchedModel for each CPU.
|
||||||
bool PPCSubtarget::enablePostMachineScheduler() const { return true; }
|
bool PPCSubtarget::enablePostRAScheduler() const { return true; }
|
||||||
|
|
||||||
PPCGenSubtargetInfo::AntiDepBreakMode PPCSubtarget::getAntiDepBreakMode() const {
|
PPCGenSubtargetInfo::AntiDepBreakMode PPCSubtarget::getAntiDepBreakMode() const {
|
||||||
return TargetSubtargetInfo::ANTIDEP_ALL;
|
return TargetSubtargetInfo::ANTIDEP_ALL;
|
||||||
|
@ -274,7 +274,7 @@ public:
|
|||||||
// Scheduling customization.
|
// Scheduling customization.
|
||||||
bool enableMachineScheduler() const override;
|
bool enableMachineScheduler() const override;
|
||||||
// This overrides the PostRAScheduler bit in the SchedModel for each CPU.
|
// This overrides the PostRAScheduler bit in the SchedModel for each CPU.
|
||||||
bool enablePostMachineScheduler() const override;
|
bool enablePostRAScheduler() const override;
|
||||||
AntiDepBreakMode getAntiDepBreakMode() const override;
|
AntiDepBreakMode getAntiDepBreakMode() const override;
|
||||||
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override;
|
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ bool TargetSubtargetInfo::enableRALocalReassignment(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TargetSubtargetInfo::enablePostMachineScheduler() const {
|
bool TargetSubtargetInfo::enablePostRAScheduler() const {
|
||||||
return getSchedModel().PostRAScheduler;
|
return getSchedModel().PostRAScheduler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user