[PATCH] D92281: [VPlan] Add getOutOfScopeIRValue accessor to VPValue.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 04:35:37 PST 2021
Ayal added a comment.
> This currently requires giving access to VPValue to those classes, so we
> can call the protected constructor. But most of them can be removed in
> the future, once the remaining single value def recipes inherit from
> VPValue.
Such access seems unneeded as commented below; but in general may have been better to handle these remaining recipes first and avoid multiple befriendings, albeit temporary.
================
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;
----------------
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?
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