Update VPReplicateRecipe to inherit from VPValue. This still does not
update scalarizeInstruction to set the result for the VPValue of
VPReplicateRecipe, because this first requires tracking scalar values in
VPTransformState.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I don't have sufficiently broad context, but to an uneducated eye, it looks really weird to have a class which can produce multiple independent instructions declared as subclass of a class named Value. Particularly since I don't think there was a required build vector step at the end of the instructions emitted?
llvm/lib/Transforms/Vectorize/VPlan.cpp | ||
---|---|---|
140 | Out of scope for this patch, but these three really look like evidence of missing isa infrastructure for the types in question. |
llvm/lib/Transforms/Vectorize/VPlan.cpp | ||
---|---|---|
140 | Agreed. Currently the problem is that VPRecipeBase does not inherit from VPValue or VPUser. The toVPValue helpers are there to avoid casting between a base class and a different type that's not a subtype. Both of those helpers are only used during the transition (until all recipes have been updated) and should go away soon. |
Out of scope for this patch, but these three really look like evidence of missing isa infrastructure for the types in question.