[PATCH] D109416: getVPMemoryOpCost interface

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 01:48:27 PDT 2021


simoll added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1121
+  InstructionCost
+  getVPMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment,
+                    unsigned AddressSpace,
----------------
RolandF wrote:
> 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.
The LLVM LangRef wording for vp.load/store/gather/scatter are missing. The intrinsics themselves are upstream though.


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