[PATCH] D76375: [VPlan] Do not print mapping for Value2VPValue.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 11:25:02 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.

The latest improvements to VPValue printing make this mapping clear when
printing the operand. Printing the mapping separately is not required
any longer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76375

Files:
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp


Index: llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
===================================================================
--- llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
+++ llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
@@ -89,6 +89,9 @@
   EXPECT_EQ(IndvarAdd, ICmp->getOperand(0));
   EXPECT_EQ(VecBB->getCondBit(), ICmp);
 
+  // Add an external value to check we do not print the list of external values,
+  // as this is not required with the new printing.
+  Plan->addVPValue(&*F->arg_begin());
   std::string FullDump;
   raw_string_ostream(FullDump) << *Plan;
   EXPECT_EQ(R"(digraph VPlan {
Index: llvm/lib/Transforms/Vectorize/VPlan.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -580,19 +580,13 @@
   OS << "graph [labelloc=t, fontsize=30; label=\"Vectorization Plan";
   if (!Plan.getName().empty())
     OS << "\\n" << DOT::EscapeString(Plan.getName());
-  if (!Plan.Value2VPValue.empty() || Plan.BackedgeTakenCount) {
+  if (Plan.BackedgeTakenCount) {
     OS << ", where:";
     if (Plan.BackedgeTakenCount) {
       OS << "\\n";
       Plan.BackedgeTakenCount->print(OS, SlotTracker);
       OS << " := BackedgeTakenCount";
     }
-    for (auto Entry : Plan.Value2VPValue) {
-      OS << "\\n";
-      Entry.second->print(OS, SlotTracker);
-      OS << DOT::EscapeString(" := ");
-      Entry.first->printAsOperand(OS, false);
-    }
   }
   OS << "\"]\n";
   OS << "node [shape=rect, fontname=Courier, fontsize=30]\n";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76375.251134.patch
Type: text/x-patch
Size: 1578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200318/e69e96c3/attachment.bin>


More information about the llvm-commits mailing list