Skip to content

Commit

Permalink
[AMDGPU] Refactor several functions for downstream merging.
Browse files Browse the repository at this point in the history
For setScore, the root function is setScoreByInterval with RegInterval
input.
For determineWait, the root function is determineWait with RegInterval
inputs.
  • Loading branch information
cmc-rep committed Sep 30, 2024
1 parent 0ca7372 commit 103dd11
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,18 +859,21 @@ void WaitcntBrackets::updateByEvent(const SIInstrInfo *TII,
}
} else if (TII->isMIMG(Inst)) {
if (Inst.mayStore()) {
setScoreByOperand(&Inst, TRI, MRI, Inst.getOperand(0), EXP_CNT, CurrScore);
setScoreByOperand(&Inst, TRI, MRI, Inst.getOperand(0), EXP_CNT,
CurrScore);
} else if (SIInstrInfo::isAtomicRet(Inst)) {
setScoreByOperand(&Inst, TRI, MRI,
*TII->getNamedOperand(Inst, AMDGPU::OpName::data),
EXP_CNT, CurrScore);
}
} else if (TII->isMTBUF(Inst)) {
if (Inst.mayStore())
setScoreByOperand(&Inst, TRI, MRI, Inst.getOperand(0), EXP_CNT, CurrScore);
setScoreByOperand(&Inst, TRI, MRI, Inst.getOperand(0), EXP_CNT,
CurrScore);
} else if (TII->isMUBUF(Inst)) {
if (Inst.mayStore()) {
setScoreByOperand(&Inst, TRI, MRI, Inst.getOperand(0), EXP_CNT, CurrScore);
setScoreByOperand(&Inst, TRI, MRI, Inst.getOperand(0), EXP_CNT,
CurrScore);
} else if (SIInstrInfo::isAtomicRet(Inst)) {
setScoreByOperand(&Inst, TRI, MRI,
*TII->getNamedOperand(Inst, AMDGPU::OpName::data),
Expand Down

0 comments on commit 103dd11

Please sign in to comment.