Skip to content

Commit e751f30

Browse files
committed
Make names more specific
1 parent 74df19e commit e751f30

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ void WaitcntBrackets::updateByEvent(const SIInstrInfo *TII,
10971097
setRegScore(FIRST_LDS_VGPR, T, CurrScore);
10981098
}
10991099

1100-
if (SIInstrInfo::asynchronouslyWritesSCC(Inst.getOpcode())) {
1100+
if (SIInstrInfo::isSBarrierSCCWrite(Inst.getOpcode())) {
11011101
setRegScore(SCC, T, CurrScore);
11021102
PendingSCCWrite = &Inst;
11031103
}
@@ -2069,7 +2069,7 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(MachineInstr &MI,
20692069
// TODO: Remove this work-around, enable the assert for Bug 457939
20702070
// after fixing the scheduler. Also, the Shader Compiler code is
20712071
// independent of target.
2072-
if (SIInstrInfo::readsVCCZ(MI) && ST->hasReadVCCZBug() &&
2072+
if (SIInstrInfo::isCBranchVCCZRead(MI) && ST->hasReadVCCZBug() &&
20732073
ScoreBrackets.hasPendingEvent(SMEM_ACCESS)) {
20742074
Wait.DsCnt = 0;
20752075
}
@@ -2311,7 +2311,7 @@ void SIInsertWaitcnts::updateEventWaitcntAfter(MachineInstr &Inst,
23112311
ScoreBrackets->updateByEvent(TII, TRI, MRI, EXP_POS_ACCESS, Inst);
23122312
else
23132313
ScoreBrackets->updateByEvent(TII, TRI, MRI, EXP_GPR_LOCK, Inst);
2314-
} else if (SIInstrInfo::asynchronouslyWritesSCC(Inst.getOpcode())) {
2314+
} else if (SIInstrInfo::isSBarrierSCCWrite(Inst.getOpcode())) {
23152315
ScoreBrackets->updateByEvent(TII, TRI, MRI, SCC_WRITE, Inst);
23162316
} else {
23172317
switch (Inst.getOpcode()) {
@@ -2489,7 +2489,7 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction &MF,
24892489
OldWaitcntInstr = nullptr;
24902490

24912491
// Restore vccz if it's not known to be correct already.
2492-
bool RestoreVCCZ = !VCCZCorrect && SIInstrInfo::readsVCCZ(Inst);
2492+
bool RestoreVCCZ = !VCCZCorrect && SIInstrInfo::isCBranchVCCZRead(Inst);
24932493

24942494
// Don't examine operands unless we need to track vccz correctness.
24952495
if (ST->hasReadVCCZBug() || !ST->partialVCCWritesUpdateVCCZ()) {

llvm/lib/Target/AMDGPU/SIInstrInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,13 +754,13 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
754754
return isLDSDMA(MI) && MI.getOpcode() != AMDGPU::BUFFER_STORE_LDS_DWORD;
755755
}
756756

757-
static bool asynchronouslyWritesSCC(unsigned Opcode) {
757+
static bool isSBarrierSCCWrite(unsigned Opcode) {
758758
return Opcode == AMDGPU::S_BARRIER_LEAVE ||
759759
Opcode == AMDGPU::S_BARRIER_SIGNAL_ISFIRST_IMM ||
760760
Opcode == AMDGPU::S_BARRIER_SIGNAL_ISFIRST_M0;
761761
}
762762

763-
static bool readsVCCZ(const MachineInstr &MI) {
763+
static bool isCBranchVCCZRead(const MachineInstr &MI) {
764764
unsigned Opc = MI.getOpcode();
765765
return (Opc == AMDGPU::S_CBRANCH_VCCNZ || Opc == AMDGPU::S_CBRANCH_VCCZ) &&
766766
!MI.getOperand(1).isUndef();

0 commit comments

Comments
 (0)