[PATCH] D110100: [NFCI][CodeGen, AArch64] Fix inconsistent TargetCostKind types.
Daniil Fukalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 22 10:16:58 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1a7b7d7ba232: [NFCI][CodeGen, AArch64] Fix inconsistent TargetCostKind types. (authored by dfukalov).
Changed prior to commit:
https://reviews.llvm.org/D110100?vs=373697&id=374282#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110100/new/
https://reviews.llvm.org/D110100
Files:
llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
Index: llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
===================================================================
--- llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+++ llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
@@ -1131,6 +1131,7 @@
InstructionCost InterleavedCost;
InstructionCost InstructionCost = 0;
+ const TTI::TargetCostKind CostKind = TTI::TCK_SizeAndLatency;
// Get the interleave factor
unsigned Factor = InterleavedLoad.size();
@@ -1158,8 +1159,7 @@
// be expected. Also sum the cost of the Instructions beeing left dead.
for (auto &I : Is) {
// Compute the old cost
- InstructionCost +=
- TTI.getInstructionCost(I, TargetTransformInfo::TCK_Latency);
+ InstructionCost += TTI.getInstructionCost(I, CostKind);
// The final SVIs are allowed not to be dead, all uses will be replaced
if (SVIs.find(I) != SVIs.end())
@@ -1212,7 +1212,7 @@
Indices.push_back(i);
InterleavedCost = TTI.getInterleavedMemoryOpCost(
Instruction::Load, ILTy, Factor, Indices, InsertionPoint->getAlign(),
- InsertionPoint->getPointerAddressSpace());
+ InsertionPoint->getPointerAddressSpace(), CostKind);
if (InterleavedCost >= InstructionCost) {
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110100.374282.patch
Type: text/x-patch
Size: 1247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210922/6cee0714/attachment.bin>
More information about the llvm-commits
mailing list