Skip to content

Commit c548d91

Browse files
committed
AMDGPU/InsertWaitcnts: Some more const-correctness
Reviewers: msearles, rampitec, scott.linder, kanarayan Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits, hakzsam Differential Revision: https://reviews.llvm.org/D54225 llvm-svn: 347192
1 parent e7c42dd commit c548d91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ class BlockWaitcntBrackets {
178178
}
179179
}
180180

181-
int32_t getScoreLB(InstCounterType T) {
181+
int32_t getScoreLB(InstCounterType T) const {
182182
assert(T < NUM_INST_CNTS);
183183
if (T >= NUM_INST_CNTS)
184184
return 0;
185185
return ScoreLBs[T];
186186
}
187187

188-
int32_t getScoreUB(InstCounterType T) {
188+
int32_t getScoreUB(InstCounterType T) const {
189189
assert(T < NUM_INST_CNTS);
190190
if (T >= NUM_INST_CNTS)
191191
return 0;
@@ -268,7 +268,7 @@ class BlockWaitcntBrackets {
268268
return EventUBs[W];
269269
}
270270

271-
bool counterOutOfOrder(InstCounterType T);
271+
bool counterOutOfOrder(InstCounterType T) const;
272272
unsigned int updateByWait(InstCounterType T, int ScoreToWait);
273273
void updateByEvent(const SIInstrInfo *TII, const SIRegisterInfo *TRI,
274274
const MachineRegisterInfo *MRI, WaitEventType E,
@@ -755,7 +755,7 @@ unsigned int BlockWaitcntBrackets::updateByWait(InstCounterType T,
755755

756756
// Where there are multiple types of event in the bracket of a counter,
757757
// the decrement may go out of order.
758-
bool BlockWaitcntBrackets::counterOutOfOrder(InstCounterType T) {
758+
bool BlockWaitcntBrackets::counterOutOfOrder(InstCounterType T) const {
759759
switch (T) {
760760
case VM_CNT:
761761
return false;

0 commit comments

Comments
 (0)