"equivalent when the immediate does "
"not fit in the encoding.">;
+// Use the MachineScheduler for instruction scheduling for the subtarget.
+def FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true",
+ "Use the MachineScheduler">;
//===----------------------------------------------------------------------===//
// ARM architecture class
FeatureSlowOddRegister,
FeatureSlowLoadDSubreg,
FeatureSlowVGETLNi32,
- FeatureSlowVDUP32]>;
+ FeatureSlowVDUP32,
+ FeatureUseMISched]>;
def : ProcessorModel<"cortex-r4", CortexA8Model, [ARMv7r, ProcR4,
FeatureHasRetAddrStack,
FeatureAvoidMOVsShOp,
FeatureHasSlowFPVMLx,
FeatureCrypto,
+ FeatureUseMISched,
FeatureZCZeroing]>;
def : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynosM1,
}
bool ARMSubtarget::enableMachineScheduler() const {
- // Enable the MachineScheduler before register allocation for out-of-order
- // architectures where we do not use the PostRA scheduler anymore (for now
- // restricted to swift).
- return getSchedModel().isOutOfOrder() && isSwift();
+ // Enable the MachineScheduler before register allocation for subtargets
+ // with the use-misched feature.
+ return useMachineScheduler();
}
// This overrides the PostRAScheduler bit in the SchedModel for any CPU.
bool ARMSubtarget::enablePostRAScheduler() const {
- // No need for PostRA scheduling on out of order CPUs (for now restricted to
- // swift).
- if (getSchedModel().isOutOfOrder() && isSwift())
+ // No need for PostRA scheduling on subtargets where we use the
+ // MachineScheduler.
+ if (useMachineScheduler())
return false;
return (!isThumb() || hasThumb2());
}
/// UseSoftFloat - True if we're using software floating point features.
bool UseSoftFloat = false;
+ /// UseMISched - True if MachineScheduler should be used for this subtarget.
+ bool UseMISched = false;
+
/// HasThumb2 - True if Thumb2 instructions are supported.
bool HasThumb2 = false;
bool isROPI() const;
bool isRWPI() const;
+ bool useMachineScheduler() const { return UseMISched; }
bool useSoftFloat() const { return UseSoftFloat; }
bool isThumb() const { return InThumbMode; }
bool isThumb1Only() const { return InThumbMode && !HasThumb2; }