[llvm] r347192 - AMDGPU/InsertWaitcnts: Some more const-correctness

Nicolai Haehnle via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 04:03:12 PST 2018


Author: nha
Date: Mon Nov 19 04:03:11 2018
New Revision: 347192

URL: http://llvm.org/viewvc/llvm-project?rev=347192&view=rev
Log:
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

Modified:
    llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp?rev=347192&r1=347191&r2=347192&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp Mon Nov 19 04:03:11 2018
@@ -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::updat
 
 // 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;




More information about the llvm-commits mailing list