[PATCH] D90564: [VPlan] Make VPRecipeBase inherit from VPDef.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 06:19:28 PST 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:113
+    return getVPValue();
   if (auto *V = dyn_cast<VPInstruction>(this))
     return V;
----------------
gilr wrote:
> IIUC this is still necessary since VPInstruction doesn't register itself as a VPValue in its VPDef (ownership issue?). Does this mean that using the VPDef::defined_values() API won't work when VPInstructions are involved?
> IIUC this is still necessary since VPInstruction doesn't register itself as a VPValue in its VPDef (ownership issue?). Does this mean that using the VPDef::defined_values() API won't work when VPInstructions are involved?

Using `VPDef` for `VPInstruction` required a bit of extra churn in the original version of the patches. That is why the patch turning `VPInstruction` into a `VPDef` is a bit out-of-order. D90565 turns `VPInstruction` into a `VPDef` and  allows us to get rid of `toVPValue`. I just updated the patch to do so. With that patch, `definedValues` should work as expected for all recipes.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90564



More information about the llvm-commits mailing list