Skip to content

Commit 7c554f0

Browse files
committed
Constify one more method
1 parent 4a1a2fc commit 7c554f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/Analysis/TargetTransformInfoImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase {
11701170

11711171
InstructionCost getGEPCost(Type *PointeeType, const Value *Ptr,
11721172
ArrayRef<const Value *> Operands, Type *AccessType,
1173-
TTI::TargetCostKind CostKind) {
1173+
TTI::TargetCostKind CostKind) const {
11741174
assert(PointeeType && Ptr && "can't get GEPCost of nullptr");
11751175
auto *BaseGV = dyn_cast<GlobalValue>(Ptr->stripPointerCasts());
11761176
bool HasBaseReg = (BaseGV == nullptr);
@@ -1234,7 +1234,7 @@ class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase {
12341234

12351235
// If the final address of the GEP is a legal addressing mode for the given
12361236
// access type, then we can fold it into its users.
1237-
if (static_cast<T *>(this)->isLegalAddressingMode(
1237+
if (static_cast<const T *>(this)->isLegalAddressingMode(
12381238
AccessType, const_cast<GlobalValue *>(BaseGV),
12391239
BaseOffset.sextOrTrunc(64).getSExtValue(), HasBaseReg, Scale,
12401240
Ptr->getType()->getPointerAddressSpace()))

0 commit comments

Comments
 (0)