mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83215 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,11 +48,17 @@ using namespace llvm;
|
||||
STATISTIC(NumNoops, "Number of noops inserted");
|
||||
STATISTIC(NumStalls, "Number of pipeline stalls");
|
||||
|
||||
// Post-RA scheduling is enabled with
|
||||
// TargetSubtarget.enablePostRAScheduler(). This flag can be used to
|
||||
// override the target.
|
||||
static cl::opt<bool>
|
||||
EnablePostRAScheduler("post-RA-scheduler",
|
||||
cl::desc("Enable scheduling after register allocation"),
|
||||
cl::init(false));
|
||||
static cl::opt<bool>
|
||||
EnableAntiDepBreaking("break-anti-dependencies",
|
||||
cl::desc("Break post-RA scheduling anti-dependencies"),
|
||||
cl::init(true), cl::Hidden);
|
||||
|
||||
static cl::opt<bool>
|
||||
EnablePostRAHazardAvoidance("avoid-hazards",
|
||||
cl::desc("Enable exact hazard avoidance"),
|
||||
@@ -215,10 +221,16 @@ static bool isSchedulingBoundary(const MachineInstr *MI,
|
||||
}
|
||||
|
||||
bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
|
||||
// Check that post-RA scheduling is enabled for this function
|
||||
const TargetSubtarget &ST = Fn.getTarget().getSubtarget<TargetSubtarget>();
|
||||
if (!ST.enablePostRAScheduler())
|
||||
return true;
|
||||
// Check for explicit enable/disable of post-ra scheduling.
|
||||
if (EnablePostRAScheduler.getPosition() > 0) {
|
||||
if (!EnablePostRAScheduler)
|
||||
return true;
|
||||
} else {
|
||||
// Check that post-RA scheduling is enabled for this function
|
||||
const TargetSubtarget &ST = Fn.getTarget().getSubtarget<TargetSubtarget>();
|
||||
if (!ST.enablePostRAScheduler())
|
||||
return true;
|
||||
}
|
||||
|
||||
DEBUG(errs() << "PostRAScheduler\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user