Skip to content

Commit

Permalink
AMDGPU/SILoadStoreOptimizer: Make some functions const
Browse files Browse the repository at this point in the history
Reviewers: arsenm, pendingchaos, rampitec

Reviewed By: rampitec

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65316

llvm-svn: 367517
  • Loading branch information
tstellar committed Aug 1, 2019
1 parent 66c3209 commit 7a2958b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
Expand Up @@ -165,9 +165,9 @@ class SILoadStoreOptimizer : public MachineFunctionPass {
static unsigned getNewOpcode(const CombineInfo &CI);
static std::pair<unsigned, unsigned> getSubRegIdxs(const CombineInfo &CI);
const TargetRegisterClass *getTargetRegisterClass(const CombineInfo &CI);
unsigned getOpcodeWidth(const MachineInstr &MI);
InstClassEnum getInstClass(unsigned Opc);
unsigned getRegs(unsigned Opc);
unsigned getOpcodeWidth(const MachineInstr &MI) const;
InstClassEnum getInstClass(unsigned Opc) const;
unsigned getRegs(unsigned Opc) const;

bool findMatchingInst(CombineInfo &CI);

Expand Down Expand Up @@ -394,7 +394,7 @@ bool SILoadStoreOptimizer::widthsFit(const GCNSubtarget &STM,
}
}

unsigned SILoadStoreOptimizer::getOpcodeWidth(const MachineInstr &MI) {
unsigned SILoadStoreOptimizer::getOpcodeWidth(const MachineInstr &MI) const {
const unsigned Opc = MI.getOpcode();

if (TII->isMUBUF(MI)) {
Expand All @@ -413,7 +413,7 @@ unsigned SILoadStoreOptimizer::getOpcodeWidth(const MachineInstr &MI) {
}
}

InstClassEnum SILoadStoreOptimizer::getInstClass(unsigned Opc) {
InstClassEnum SILoadStoreOptimizer::getInstClass(unsigned Opc) const {
if (TII->isMUBUF(Opc)) {
const int baseOpcode = AMDGPU::getMUBUFBaseOpcode(Opc);

Expand Down Expand Up @@ -464,7 +464,7 @@ InstClassEnum SILoadStoreOptimizer::getInstClass(unsigned Opc) {
}
}

unsigned SILoadStoreOptimizer::getRegs(unsigned Opc) {
unsigned SILoadStoreOptimizer::getRegs(unsigned Opc) const {
if (TII->isMUBUF(Opc)) {
unsigned result = 0;

Expand Down

0 comments on commit 7a2958b

Please sign in to comment.