[PATCH] D100257: [VPlan] Add VPUserID to distinguish between recipes and others.
Andrei Elovikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 09:29:05 PDT 2021
a.elovikov accepted this revision.
a.elovikov added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:685
+ static inline bool classof(const VPUser *U) {
+ return U->getVPUserID() == VPUser::VPUserID::Recipe;
+ }
----------------
fhahn wrote:
> a.elovikov wrote:
> > Can we make `getVPUserID()` protected instead of friendship above?
> Unfortunately I don't think so. If it's protected, we can access it from inside a VPRecipeBase object, but here we need to access it from a `VPUser` pointer directly.
I'd rather make the enum/method public then, but it's very subjective.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100257/new/
https://reviews.llvm.org/D100257
More information about the llvm-commits
mailing list