@@ -165,9 +165,9 @@ class SILoadStoreOptimizer : public MachineFunctionPass {
165
165
static unsigned getNewOpcode (const CombineInfo &CI);
166
166
static std::pair<unsigned , unsigned > getSubRegIdxs (const CombineInfo &CI);
167
167
const TargetRegisterClass *getTargetRegisterClass (const CombineInfo &CI);
168
- unsigned getOpcodeWidth (const MachineInstr &MI);
169
- InstClassEnum getInstClass (unsigned Opc);
170
- unsigned getRegs (unsigned Opc);
168
+ unsigned getOpcodeWidth (const MachineInstr &MI) const ;
169
+ InstClassEnum getInstClass (unsigned Opc) const ;
170
+ unsigned getRegs (unsigned Opc) const ;
171
171
172
172
bool findMatchingInst (CombineInfo &CI);
173
173
@@ -394,7 +394,7 @@ bool SILoadStoreOptimizer::widthsFit(const GCNSubtarget &STM,
394
394
}
395
395
}
396
396
397
- unsigned SILoadStoreOptimizer::getOpcodeWidth (const MachineInstr &MI) {
397
+ unsigned SILoadStoreOptimizer::getOpcodeWidth (const MachineInstr &MI) const {
398
398
const unsigned Opc = MI.getOpcode ();
399
399
400
400
if (TII->isMUBUF (MI)) {
@@ -413,7 +413,7 @@ unsigned SILoadStoreOptimizer::getOpcodeWidth(const MachineInstr &MI) {
413
413
}
414
414
}
415
415
416
- InstClassEnum SILoadStoreOptimizer::getInstClass (unsigned Opc) {
416
+ InstClassEnum SILoadStoreOptimizer::getInstClass (unsigned Opc) const {
417
417
if (TII->isMUBUF (Opc)) {
418
418
const int baseOpcode = AMDGPU::getMUBUFBaseOpcode (Opc);
419
419
@@ -464,7 +464,7 @@ InstClassEnum SILoadStoreOptimizer::getInstClass(unsigned Opc) {
464
464
}
465
465
}
466
466
467
- unsigned SILoadStoreOptimizer::getRegs (unsigned Opc) {
467
+ unsigned SILoadStoreOptimizer::getRegs (unsigned Opc) const {
468
468
if (TII->isMUBUF (Opc)) {
469
469
unsigned result = 0 ;
470
470
0 commit comments