File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,13 @@ vp_post_order_shallow(VPBlockBase *G) {
230
230
return post_order (VPBlockShallowTraversalWrapper<VPBlockBase *>(G));
231
231
}
232
232
233
+ // / Returns an iterator range to traverse the graph starting at \p G in
234
+ // / post order while traversing through region blocks.
235
+ inline iterator_range<po_iterator<VPBlockDeepTraversalWrapper<VPBlockBase *>>>
236
+ vp_post_order_deep (VPBlockBase *G) {
237
+ return post_order (VPBlockDeepTraversalWrapper<VPBlockBase *>(G));
238
+ }
239
+
233
240
// / Returns an iterator range to traverse the graph starting at \p G in
234
241
// / depth-first order while traversing through region blocks.
235
242
inline iterator_range<df_iterator<VPBlockDeepTraversalWrapper<VPBlockBase *>>>
Original file line number Diff line number Diff line change @@ -545,10 +545,8 @@ static bool isDeadRecipe(VPRecipeBase &R) {
545
545
}
546
546
547
547
void VPlanTransforms::removeDeadRecipes (VPlan &Plan) {
548
- ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT (
549
- Plan.getEntry ());
550
-
551
- for (VPBasicBlock *VPBB : reverse (VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT))) {
548
+ for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
549
+ vp_post_order_deep (Plan.getEntry ()))) {
552
550
// The recipes in the block are processed in reverse order, to catch chains
553
551
// of dead recipes.
554
552
for (VPRecipeBase &R : make_early_inc_range (reverse (*VPBB))) {
You can’t perform that action at this time.
0 commit comments