[PATCH] D147892: [VPlan] Unify Value2VPValue and VPExternalDefs maps (NFCI).

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 15 13:43:16 PDT 2023


Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.

Looks good to me, thanks!



================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:2334
   void addVPValue(Value *V, VPValue *VPV) {
-    assert(Value2VPValueEnabled && "Value2VPValue mapping may be out of date!");
+    assert((Value2VPValueEnabled || !VPV->getDefiningRecipe()) &&
+           "Value2VPValue mapping may be out of date!");
----------------
nit: an isLiveIn() method may be clearer than these !getDefiningRecipe()'s.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:2341
 
-  /// Returns the VPValue for \p V. \p OverrideAllowed can be used to disable
-  /// checking whether it is safe to query VPValues using IR Values.
+  /// Returns the VPValue for \p V.
   VPValue *getVPValue(Value *V, bool OverrideAllowed = false) {
----------------
Retain documentation of \p OverrideAllowed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147892



More information about the llvm-commits mailing list