[PATCH] D140512: [VPlan] Add vp_depth_first_nonrecursive + graph traits for wrapper(NFC)
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 21:35:59 PST 2023
Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.
Ship it!
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanCFG.h:322
+vp_depth_first_nonrecursive(VPBlockBase *G) {
+ return depth_first(VPBlockNonRecursiveTraversalWrapper<VPBlockBase *>(G));
+}
----------------
nit: for completeness can also introduce `vp_depth_first_recursive(VPBlockBase *G)` which returns `depth_first(VPBlockRecursiveTraversalWrapper<VPBlockBase *>(G));` used elsewhere.
nit: "recursive" here stands for traversing inside regions of the hierarchical CFG. Perhaps a more accurate term is "deep" versus "flat" or "shallow", given the recursive nature of DFS itself.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140512/new/
https://reviews.llvm.org/D140512
More information about the llvm-commits
mailing list