Skip to content

Commit 3da7d55

Browse files
authored
[NFC][AMDGPU] Remove unnecessary member ForceEmitZeroWaitcnts (#112114)
We can use `ForceEmitZeroFlag` directly.
1 parent 1a787b3 commit 3da7d55

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,6 @@ class SIInsertWaitcnts : public MachineFunctionPass {
611611

612612
MapVector<MachineBasicBlock *, BlockInfo> BlockInfos;
613613

614-
// ForceEmitZeroWaitcnts: force all waitcnts insts to be s_waitcnt 0
615-
// because of amdgpu-waitcnt-forcezero flag
616-
bool ForceEmitZeroWaitcnts;
617614
bool ForceEmitWaitcnt[NUM_INST_CNTS];
618615

619616
// In any given run of this pass, WCG will point to one of these two
@@ -1828,7 +1825,7 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(MachineInstr &MI,
18281825
// Verify that the wait is actually needed.
18291826
ScoreBrackets.simplifyWaitcnt(Wait);
18301827

1831-
if (ForceEmitZeroWaitcnts)
1828+
if (ForceEmitZeroFlag)
18321829
Wait = WCG->getAllZeroWaitcnt(/*IncludeVSCnt=*/false);
18331830

18341831
if (ForceEmitWaitcnt[LOAD_CNT])
@@ -2424,7 +2421,6 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) {
24242421
WCG = &WCGPreGFX12;
24252422
}
24262423

2427-
ForceEmitZeroWaitcnts = ForceEmitZeroFlag;
24282424
for (auto T : inst_counter_types())
24292425
ForceEmitWaitcnt[T] = false;
24302426

0 commit comments

Comments
 (0)