[PATCH] D38676: [LV] Model masking in VPlan, introducing VPInstructions

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 03:39:46 PDT 2017


aemerson added inline comments.


================
Comment at: lib/Transforms/Vectorize/VPlan.h:736
+    for (auto &MapEntry : Value2VPValue)
+      delete MapEntry.second;
   }
----------------
gilr wrote:
> aemerson wrote:
> > Why delete the value from the map but leave the key?
> These are Values from the existing IR code - VPlan doesn't own them, just maintains a VPValue to represent them at the VPlan-level Def-Use graph.
I meant why not erase() the entry from the map completely. Lleaving the key in the map but with a now invalid pointer doesn't seem right, unless I'm missing something.


https://reviews.llvm.org/D38676





More information about the llvm-commits mailing list