[PATCH] D84679: [VPlan] Disconnect VPValue and VPUser.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 13:17:17 PDT 2020


fhahn added a comment.

In D84679#2285752 <https://reviews.llvm.org/D84679#2285752>, @dmgreen wrote:

>> With this patch, `VPRecipeBase` is also a `VPUser` and a `VPValue`, it just inherits from both directly, rather than indirectly through `VPValue`. Note that 'replacing all uses with & co' are provided by VPValue, so all instances that could previously be RAUW'd can still be RAUW'd.  The only major difference should be that in the future we may need some extra code to get the uses of a `VPUser`.
>
> Do you mean VPInstruction is a VPUser and a VPValue? I really meant that _all_ recipes were VPValues and VPUsers, moving it to VPRecipeBase.

Sorry, I did not mean that everything will be changed in this patch. But the linked patches gradually turn all the recipes into VPValues and update VPInterleaveRecipe to produce multiple values (and moves VPlan codegen to use that). So with the current patch alone, it is not yet possible to traverse def-use chains in recipes, but once the transition is done, it should be possible to traverse in both directions. (I think most recipes should already be ready to be turned into VPUser, let me check which ones are still missing)

As Ayal mentioned, when walking from defs to users there walker may need to check the user in order to continue traversing, but it should be relatively straight forward to provide some nice helpers for that.

It would be great to have some concrete simple transforms using it as soon as its ready to make sure everything works well together, so if we could collaborate on that, that would be great!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84679



More information about the llvm-commits mailing list