@@ -40,9 +40,9 @@ using namespace llvm;
40
40
#include " AMDGPUGenSubtargetInfo.inc"
41
41
#undef AMDGPUSubtarget
42
42
43
- static cl::opt<bool > DisablePowerSched (
44
- " amdgpu-disable -power-sched" ,
45
- cl::desc (" Disable scheduling to minimize mAI power bursts" ),
43
+ static cl::opt<bool > EnablePowerSched (
44
+ " amdgpu-enable -power-sched" ,
45
+ cl::desc (" Enable scheduling to minimize mAI power bursts" ),
46
46
cl::init(false ));
47
47
48
48
static cl::opt<bool > EnableVGPRIndexMode (
@@ -916,7 +916,7 @@ struct FillMFMAShadowMutation : ScheduleDAGMutation {
916
916
917
917
void apply (ScheduleDAGInstrs *DAGInstrs) override {
918
918
const GCNSubtarget &ST = DAGInstrs->MF .getSubtarget <GCNSubtarget>();
919
- if (!ST.hasMAIInsts () || DisablePowerSched )
919
+ if (!ST.hasMAIInsts ())
920
920
return ;
921
921
DAG = static_cast <ScheduleDAGMI*>(DAGInstrs);
922
922
const TargetSchedModel *TSchedModel = DAGInstrs->getSchedModel ();
@@ -966,7 +966,8 @@ void GCNSubtarget::getPostRAMutations(
966
966
967
967
std::unique_ptr<ScheduleDAGMutation>
968
968
GCNSubtarget::createFillMFMAShadowMutation (const TargetInstrInfo *TII) const {
969
- return std::make_unique<FillMFMAShadowMutation>(&InstrInfo);
969
+ return EnablePowerSched ? std::make_unique<FillMFMAShadowMutation>(&InstrInfo)
970
+ : nullptr ;
970
971
}
971
972
972
973
const AMDGPUSubtarget &AMDGPUSubtarget::get (const MachineFunction &MF) {
0 commit comments