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
This commit is contained in:
Nicolai Haehnle 2018-11-19 12:03:11 +00:00
parent e7c42dd7e2
commit c548d91419
1 changed files with 4 additions and 4 deletions

View File

@ -178,14 +178,14 @@ public:
}
}
int32_t getScoreLB(InstCounterType T) {
int32_t getScoreLB(InstCounterType T) const {
assert(T < NUM_INST_CNTS);
if (T >= NUM_INST_CNTS)
return 0;
return ScoreLBs[T];
}
int32_t getScoreUB(InstCounterType T) {
int32_t getScoreUB(InstCounterType T) const {
assert(T < NUM_INST_CNTS);
if (T >= NUM_INST_CNTS)
return 0;
@ -268,7 +268,7 @@ public:
return EventUBs[W];
}
bool counterOutOfOrder(InstCounterType T);
bool counterOutOfOrder(InstCounterType T) const;
unsigned int updateByWait(InstCounterType T, int ScoreToWait);
void updateByEvent(const SIInstrInfo *TII, const SIRegisterInfo *TRI,
const MachineRegisterInfo *MRI, WaitEventType E,
@ -755,7 +755,7 @@ unsigned int BlockWaitcntBrackets::updateByWait(InstCounterType T,
// Where there are multiple types of event in the bracket of a counter,
// the decrement may go out of order.
bool BlockWaitcntBrackets::counterOutOfOrder(InstCounterType T) {
bool BlockWaitcntBrackets::counterOutOfOrder(InstCounterType T) const {
switch (T) {
case VM_CNT:
return false;