[PATCH] D76374: [VPlan] Record underlying value for VPValues created by addVPValue (NFC).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 11:25:00 PDT 2020


fhahn created this revision.
fhahn added reviewers: rengolin, hsaito, Ayal, gilr.
Herald added subscribers: psnobl, rogfer01, rkruppe, tschuett, bollu, hiraditya.
Herald added a project: LLVM.

Now that printing VPValues uses the underlying IR value name, if
available, recording the underlying value here improves printing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76374

Files:
  llvm/lib/Transforms/Vectorize/VPlan.h


Index: llvm/lib/Transforms/Vectorize/VPlan.h
===================================================================
--- llvm/lib/Transforms/Vectorize/VPlan.h
+++ llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1488,7 +1488,7 @@
   void addVPValue(Value *V) {
     assert(V && "Trying to add a null Value to VPlan");
     assert(!Value2VPValue.count(V) && "Value already exists in VPlan");
-    Value2VPValue[V] = new VPValue();
+    Value2VPValue[V] = new VPValue(V);
   }
 
   VPValue *getVPValue(Value *V) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76374.251131.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200318/707843e0/attachment.bin>


More information about the llvm-commits mailing list