[llvm] 86dc6a3 - [AMDGPU] Constify a couple of methods. NFC.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 04:05:02 PDT 2022


Author: Jay Foad
Date: 2022-11-02T11:04:54Z
New Revision: 86dc6a3c0feeaca5ee442dd624ef4faaa895886e

URL: https://github.com/llvm/llvm-project/commit/86dc6a3c0feeaca5ee442dd624ef4faaa895886e
DIFF: https://github.com/llvm/llvm-project/commit/86dc6a3c0feeaca5ee442dd624ef4faaa895886e.diff

LOG: [AMDGPU] Constify a couple of methods. NFC.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 5e0ae4c2581f6..4314595684710 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -216,7 +216,7 @@ class WaitcntBrackets {
   }
 
   // Mapping from event to counter.
-  InstCounterType eventCounter(WaitEventType E) {
+  InstCounterType eventCounter(WaitEventType E) const {
     for (auto T : inst_counter_types()) {
       if (WaitEventMaskForInst[T] & (1 << E))
         return T;
@@ -471,7 +471,7 @@ class SIInsertWaitcnts : public MachineFunctionPass {
   bool applyPreexistingWaitcnt(WaitcntBrackets &ScoreBrackets,
                                MachineInstr &OldWaitcntInstr,
                                AMDGPU::Waitcnt &Wait,
-                               MachineBasicBlock::instr_iterator It);
+                               MachineBasicBlock::instr_iterator It) const;
 };
 
 } // end anonymous namespace
@@ -850,7 +850,7 @@ FunctionPass *llvm::createSIInsertWaitcntsPass() {
 /// preexisting waitcnt are required for correctness.
 bool SIInsertWaitcnts::applyPreexistingWaitcnt(
     WaitcntBrackets &ScoreBrackets, MachineInstr &OldWaitcntInstr,
-    AMDGPU::Waitcnt &Wait, MachineBasicBlock::instr_iterator It) {
+    AMDGPU::Waitcnt &Wait, MachineBasicBlock::instr_iterator It) const {
   bool Modified = false;
   MachineInstr *WaitcntInstr = nullptr;
   MachineInstr *WaitcntVsCntInstr = nullptr;


        


More information about the llvm-commits mailing list