[llvm] 4388c97 - [VPlan] Use vector.body as header name in VPlan native path.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 01:31:39 PDT 2022
Author: Florian Hahn
Date: 2022-04-07T10:31:12+02:00
New Revision: 4388c979dabbbe763275c1f94293f19b56c8ed3d
URL: https://github.com/llvm/llvm-project/commit/4388c979dabbbe763275c1f94293f19b56c8ed3d
DIFF: https://github.com/llvm/llvm-project/commit/4388c979dabbbe763275c1f94293f19b56c8ed3d.diff
LOG: [VPlan] Use vector.body as header name in VPlan native path.
This brings the VPlan block naming in line with the naming of the
generated basic blocks.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
index 379988733312b..68cd1a570536e 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
@@ -264,6 +264,7 @@ VPRegionBlock *PlainCFGBuilder::buildPlainCFG() {
}
// Create empty VPBB for Loop H so that we can link PH->H.
VPBlockBase *HeaderVPBB = getOrCreateVPBB(TheLoop->getHeader());
+ HeaderVPBB->setName("vector.body");
// Preheader's predecessors will be set during the loop RPO traversal below.
PreheaderVPBB->setOneSuccessor(HeaderVPBB);
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
index 01ea8377da07e..e7ca767e4b3a2 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
@@ -106,11 +106,11 @@ compound=true
label="\<x1\> TopRegion"
N1 [label =
"entry:\l" +
- "Successor(s): for.body\l"
+ "Successor(s): vector.body\l"
]
N1 -> N2 [ label=""]
N2 [label =
- "for.body:\l" +
+ "vector.body:\l" +
" WIDEN-PHI ir\<%indvars.iv\> = phi ir\<0\>, ir\<%indvars.iv.next\>\l" +
" EMIT ir\<%arr.idx\> = getelementptr ir\<%A\> ir\<%indvars.iv\>\l" +
" EMIT ir\<%l1\> = load ir\<%arr.idx\>\l" +
@@ -118,8 +118,8 @@ compound=true
" EMIT store ir\<%res\> ir\<%arr.idx\>\l" +
" EMIT ir\<%indvars.iv.next\> = add ir\<%indvars.iv\> ir\<1\>\l" +
" EMIT ir\<%exitcond\> = icmp ir\<%indvars.iv.next\> ir\<%N\>\l" +
- "Successor(s): for.body, for.end\l" +
- "CondBit: ir\<%exitcond\> (for.body)\l"
+ "Successor(s): vector.body, for.end\l" +
+ "CondBit: ir\<%exitcond\> (vector.body)\l"
]
N2 -> N2 [ label="T"]
N2 -> N3 [ label="F"]
More information about the llvm-commits
mailing list