Skip to content

Commit

Permalink
[VPlan] Do not print mapping for Value2VPValue.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fhahn committed Mar 18, 2020
1 parent ae7bda5 commit fd2c15e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
17 changes: 4 additions & 13 deletions llvm/lib/Transforms/Vectorize/VPlan.cpp
Expand Up @@ -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";
Expand Down
3 changes: 3 additions & 0 deletions llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
Expand Up @@ -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 {
Expand Down

0 comments on commit fd2c15e

Please sign in to comment.