forked from OSchip/llvm-project
[AMDGPU] Disable FillMFMAShadowMutation by default
Disable amdgpu mfma power sched. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D129172
This commit is contained in:
parent
bfa2c42001
commit
6817031d0b
|
@ -40,9 +40,9 @@ using namespace llvm;
|
|||
#include "AMDGPUGenSubtargetInfo.inc"
|
||||
#undef AMDGPUSubtarget
|
||||
|
||||
static cl::opt<bool> DisablePowerSched(
|
||||
"amdgpu-disable-power-sched",
|
||||
cl::desc("Disable scheduling to minimize mAI power bursts"),
|
||||
static cl::opt<bool> EnablePowerSched(
|
||||
"amdgpu-enable-power-sched",
|
||||
cl::desc("Enable scheduling to minimize mAI power bursts"),
|
||||
cl::init(false));
|
||||
|
||||
static cl::opt<bool> EnableVGPRIndexMode(
|
||||
|
@ -916,7 +916,7 @@ struct FillMFMAShadowMutation : ScheduleDAGMutation {
|
|||
|
||||
void apply(ScheduleDAGInstrs *DAGInstrs) override {
|
||||
const GCNSubtarget &ST = DAGInstrs->MF.getSubtarget<GCNSubtarget>();
|
||||
if (!ST.hasMAIInsts() || DisablePowerSched)
|
||||
if (!ST.hasMAIInsts())
|
||||
return;
|
||||
DAG = static_cast<ScheduleDAGMI*>(DAGInstrs);
|
||||
const TargetSchedModel *TSchedModel = DAGInstrs->getSchedModel();
|
||||
|
@ -966,7 +966,8 @@ void GCNSubtarget::getPostRAMutations(
|
|||
|
||||
std::unique_ptr<ScheduleDAGMutation>
|
||||
GCNSubtarget::createFillMFMAShadowMutation(const TargetInstrInfo *TII) const {
|
||||
return std::make_unique<FillMFMAShadowMutation>(&InstrInfo);
|
||||
return EnablePowerSched ? std::make_unique<FillMFMAShadowMutation>(&InstrInfo)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
const AMDGPUSubtarget &AMDGPUSubtarget::get(const MachineFunction &MF) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass post-RA-sched -amdgpu-disable-power-sched -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
|
||||
# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass post-RA-sched -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
|
||||
|
||||
# GCN-LABEL: name: unrelated_mfma
|
||||
# GCN: V_MFMA_F32_32X32X1F32
|
||||
|
|
Loading…
Reference in New Issue