diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-08-18 11:55:23 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-08-18 11:55:23 +0100 |
commit | fdec50182d85ec0b8518af3baae37ae28b102f1c (patch) | |
tree | f620576762fe4f39bf29b33faa01c4f7938b2d2f /llvm/lib/Transforms/Scalar/LoopFlatten.cpp | |
parent | 27cbfa7cc8cdab121842adf4dd31f6811f523928 (diff) | |
download | llvm-fdec50182d85ec0b8518af3baae37ae28b102f1c.zip llvm-fdec50182d85ec0b8518af3baae37ae28b102f1c.tar.gz llvm-fdec50182d85ec0b8518af3baae37ae28b102f1c.tar.bz2 |
[CostModel] Replace getUserCost with getInstructionCost
* Replace getUserCost with getInstructionCost, covering all cost kinds.
* Remove getInstructionLatency, it's not implemented by any backends, and we should fold the functionality into getUserCost (now getInstructionCost) to make it easier for targets to handle the cost kinds with their existing cost callbacks.
Original Patch by @samparker (Sam Parker)
Differential Revision: https://reviews.llvm.org/D79483
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopFlatten.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopFlatten.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopFlatten.cpp b/llvm/lib/Transforms/Scalar/LoopFlatten.cpp index aa75af2..c530e77 100644 --- a/llvm/lib/Transforms/Scalar/LoopFlatten.cpp +++ b/llvm/lib/Transforms/Scalar/LoopFlatten.cpp @@ -552,7 +552,7 @@ checkOuterLoopInsts(FlattenInfo &FI, m_Specific(FI.InnerTripCount)))) continue; InstructionCost Cost = - TTI->getUserCost(&I, TargetTransformInfo::TCK_SizeAndLatency); + TTI->getInstructionCost(&I, TargetTransformInfo::TCK_SizeAndLatency); LLVM_DEBUG(dbgs() << "Cost " << Cost << ": "; I.dump()); RepeatedInstrCost += Cost; } |