[PATCH] D76992: [VPlan] Add & use VPValue operands for VPWidenRecipe (NFC).

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 02:08:09 PDT 2020


gilr added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanValue.h:47
   friend class VPSlotTracker;
+  friend class VPWidenRecipe;
 
----------------
fhahn wrote:
> gilr wrote:
> > Make ILV friends with VPValue instead? Would facilitate removing that last lambda.
> I think granting access to ILV would mean that the scope where the underlying value can be accessed would be extended a lot and might encourage more uses (which I think is undesired). I think the lambda allows us to grant more targeted access and there is only a single use in widenInstruction, which will hopefully removed in the future. Does that make sense? I would be also happy to make ILV a friend, if you think that's preferable over the lambda in the long run.
Letting ILV access the underlying value seems to follow the intent of the design principle preceding getUnderlyingValue()'s declaration of limiting its use to the code-gen phase.
Anyway, I agree with Ayal that a better solution would be to take that decision during planning rather than during code-gen.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76992





More information about the llvm-commits mailing list