[PATCH] D92281: [VPlan] Add getOutOfScopeIRValue accessor to VPValue.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 06:04:40 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanValue.h:74
   /// Pointer to the VPDef that defines this VPValue. If it is nullptr, the
   /// VPValue is not defined by any recipe modeled in VPlan.
   VPDef *Def;
----------------
Ayal wrote:
> As explained above, Def is null iff this VPValue is a "live-in", i.e., defined outside the loop (and used inside the loop).
> So getOutOfScopeIRValue() (getLiveInValue()?) could simply `return (getDef()? getUnderlyingValue() : nullptr)`, or its users could do so themselves directly?
I did that and updated the function name. I think it is still worth to have it as a separate function, because there will be a few users in the following patches. Also, I think granting access to live-in IR values makes sense in general, even once we push back/reduce uses of `getUnderlyingValue` elsewhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92281



More information about the llvm-commits mailing list