[llvm] 00c1cd1 - [VPlan] Record underlying value for VPValues created by addVPValue (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 14:31:15 PDT 2020


Author: Florian Hahn
Date: 2020-03-18T21:30:58Z
New Revision: 00c1cd193497753b47d45c5f982e13b73215692a

URL: https://github.com/llvm/llvm-project/commit/00c1cd193497753b47d45c5f982e13b73215692a
DIFF: https://github.com/llvm/llvm-project/commit/00c1cd193497753b47d45c5f982e13b73215692a.diff

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

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

Reviewers: rengolin, hsaito, Ayal, gilr

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D76374

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 17218e469af7..044d2ffc3fc3 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1488,7 +1488,7 @@ class VPlan {
   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) {


        


More information about the llvm-commits mailing list