[PATCH] D105432: [Analysis] Add simple cost model for strict (in-order) reductions

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 05:09:21 PDT 2021


david-arm marked an inline comment as done.
david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1548
       getMemoryOpCost(Opcode, VT->getElementType(), Alignment, 0, CostKind, I);
-  unsigned MaxNumElementsPerGather =
-      MaxNumVScale.getValue() * LegalVF.getKnownMinValue();
-  return LT.first * MaxNumElementsPerGather * MemOpCost;
+  return LT.first * MemOpCost * getMaxNumElements(LegalVF);
 }
----------------
sdesmalen wrote:
> Why are you changing the GatherScatterOpCost in this patch?
I'm not actually changing it - I just wanted to avoid duplicating the max vscale code for the ordered reduction case so I moved the logic into a common function `getMaxNumElements`. This is all related to calculating the scalarisation cost.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105432/new/

https://reviews.llvm.org/D105432



More information about the llvm-commits mailing list