[llvm] fd2c15e - [VPlan] Do not print mapping for Value2VPValue.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 14:44:23 PDT 2020
Author: Florian Hahn
Date: 2020-03-18T21:44:07Z
New Revision: fd2c15e6024fa5d27dd95a8f57b33deb1eddba39
URL: https://github.com/llvm/llvm-project/commit/fd2c15e6024fa5d27dd95a8f57b33deb1eddba39
DIFF: https://github.com/llvm/llvm-project/commit/fd2c15e6024fa5d27dd95a8f57b33deb1eddba39.diff
LOG: [VPlan] Do not print mapping for Value2VPValue.
The latest improvements to VPValue printing make this mapping clear when
printing the operand. Printing the mapping separately is not required
any longer.
Reviewers: rengolin, hsaito, Ayal, gilr
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D76375
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 19841edb1eeb..28463943bfa3 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -580,19 +580,10 @@ void VPlanPrinter::dump() {
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) {
- 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);
- }
+ if (Plan.BackedgeTakenCount) {
+ OS << ", where:\\n";
+ Plan.BackedgeTakenCount->print(OS, SlotTracker);
+ OS << " := BackedgeTakenCount";
}
OS << "\"]\n";
OS << "node [shape=rect, fontname=Courier, fontsize=30]\n";
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
index debf7b956101..5269a9a17543 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
@@ -89,6 +89,9 @@ TEST_F(VPlanHCFGTest, testBuildHCFGInnerLoop) {
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 {
More information about the llvm-commits
mailing list