Skip to content

Commit 55688a7

Browse files
committed
!fixup, Remove default value in getAddressComputationCost.
1 parent bcc3a40 commit 55688a7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

llvm/include/llvm/Analysis/TargetTransformInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,9 +1680,9 @@ class TargetTransformInfo {
16801680
/// function. \p SE holds the pointer for the scalar evolution object which
16811681
/// was used in order to get the Ptr step value. \p Ptr holds the SCEV of the
16821682
/// access pointer.
1683-
LLVM_ABI InstructionCost getAddressComputationCost(
1684-
Type *PtrTy, ScalarEvolution *SE = nullptr, const SCEV *Ptr = nullptr,
1685-
TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput) const;
1683+
LLVM_ABI InstructionCost
1684+
getAddressComputationCost(Type *PtrTy, ScalarEvolution *SE, const SCEV *Ptr,
1685+
TTI::TargetCostKind CostKind) const;
16861686

16871687
/// \returns The cost, if any, of keeping values of the given types alive
16881688
/// over a callsite.

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2309,7 +2309,9 @@ chainToBasePointerCost(SmallVectorImpl<Instruction *> &Chain,
23092309

23102310
} else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Instr)) {
23112311
// Cost of the address calculation
2312-
Cost += TTI.getAddressComputationCost(GEP->getType());
2312+
Cost += TTI.getAddressComputationCost(
2313+
GEP->getType(), nullptr, nullptr,
2314+
TargetTransformInfo::TCK_SizeAndLatency);
23132315

23142316
// And cost of the GEP itself
23152317
// TODO: Use TTI->getGEPCost here (it exists, but appears to be not

0 commit comments

Comments
 (0)