[PATCH] D140512: [VPlan] Add vp_depth_first_nonrecursive + graph traits for wrapper(NFC)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 13:37:15 PST 2023


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanCFG.h:322
+vp_depth_first_nonrecursive(VPBlockBase *G) {
+  return depth_first(VPBlockNonRecursiveTraversalWrapper<VPBlockBase *>(G));
+}
----------------
Ayal wrote:
> 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.
> nit: for completeness can also introduce vp_depth_first_recursive(VPBlockBase *G) which returns depth_first(VPBlockRecursiveTraversalWrapper<VPBlockBase *>(G)); used elsewhere.

I'll add a separate patch for that.

> 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.

Updated the name to use `_shallow` instead of non recursive, thanks!


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