[PATCH] D100257: [VPlan] Add VPUserID to distinguish between recipes and others.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 06:47:24 PDT 2021


fhahn added a comment.

In D100257#2733027 <https://reviews.llvm.org/D100257#2733027>, @Ayal wrote:

> In D100257#2733025 <https://reviews.llvm.org/D100257#2733025>, @gilr wrote:
>
>> The anticipated long-term need for non-recipe VPUsers is indeed to represent live-outs, along with their underlying IR Value, or rather Instruction; analogous to VPValue::getLiveInIRValue(). This would call for a derived VPLiveOut non-recipe subclass of VPUser.
>>
>> VPUser class itself should probably be pure virtual, similar to `User`, to avoid having a potential kitchen sink of dangling opaque instances. Instead of representing arbitrary "other"/"non-recipe" instances, the current VPUsers of VPBasicBlock predicates and conditions could be represented as specific, concrete subclasses of VPUser, potentially until they are cleaned up. WDYT?
>
> +1

Thanks, I updated the code to turn VPUser in a virtual base class and added s subclass for the uses in VPBlockBase. WDYT?

(For now I used a dummy function `VPUser::makeVPUserVirtual` to turn `VPUser` into a pure virtual class. Not sure if there's a different way?)


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