[PATCH] D84684: [VPlan] Use VPValue def for VPInterleaveRecipe.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 12:32:50 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:966
 void VPValue::replaceAllUsesWith(VPValue *New) {
+  if (isVirtual()) {
+    auto *IR = cast<VPInterleaveRecipe>(this);
----------------
dmgreen wrote:
> Is this used at the moment? Should we be blindly replacing all the different uses with the same value?
No it's not used (also not in follow-ups). I added an assert.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1040
+    for (unsigned i = 0; i < IG->getNumMembers(); i++)
+      Defs.push_back(new VPValue(this));
   }
----------------
dmgreen wrote:
> Does anything delete these Defs?
They should be freed in the destructor. Done now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84684



More information about the llvm-commits mailing list