[PATCH] D107223: [VPlan] Use defined and ops VPValues to print VPInterleaveRecipe.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 23:53:16 PDT 2021


Ayal added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9552
+  unsigned OpIdx = 0;
+  for (unsigned i = 0; i < IG->getFactor(); ++i) {
+    if (!IG->getMember(i))
----------------
fhahn wrote:
> Ayal wrote:
> > Would have been nice to iterate over the recipe's operands and/or def VPValues, instead of calling getOperand()/getVPValue() for each, but the former does not tell where the gaps are.
> Agreed! Perhaps it would be worth adding that information to the recipe, removing the requirement to reference the interleave group?
Agreed! It would be better to have the recipe record that information (and avoid keeping IG altogether), rather than rely on whether IG->getMember(i) returns an Instruction* or null, but refrain from using that Instruction.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107223



More information about the llvm-commits mailing list