[PATCH] D109416: getVPMemoryOpCost interface

Roland Froese via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 12:33:25 PDT 2021


RolandF added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1121
+  InstructionCost
+  getVPMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment,
+                    unsigned AddressSpace,
----------------
RolandF wrote:
> bmahjour wrote:
> > RolandF wrote:
> > > I prefer the downstream name getVariableLengthMemoryOpCost.  I'm not sure
> > > what VP stands for here and it seems like VP is already used in the context of VPlan.  At least explain in the comment.
> > VP stands for Vector Predication and is the name that the community has used for all the predicated intrinsics. See https://llvm.org/docs/LangRef.html#vector-predication-intrinsics
> Well, I followed your link.  There are no "vp" memory ops.  The loads and stores are named "masked" operations.
The target implementation you propose depends on having an Instruction parameter passed in.  If you pass in an Instruction you could actually figure out from the dynamic cast that this is a vp intrinsic.  The existing getMemoryOpCost allows passing in an Instruction, so it seems like you could figure this out without a new interface.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109416



More information about the llvm-commits mailing list