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) {
230230 return post_order (VPBlockShallowTraversalWrapper<VPBlockBase *>(G));
231231}
232232
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+
233240// / Returns an iterator range to traverse the graph starting at \p G in
234241// / depth-first order while traversing through region blocks.
235242inline 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) {
545545}
546546
547547void 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 ()))) {
552550 // The recipes in the block are processed in reverse order, to catch chains
553551 // of dead recipes.
554552 for (VPRecipeBase &R : make_early_inc_range (reverse (*VPBB))) {
You can’t perform that action at this time.
0 commit comments