[PATCH] D62507: [Dominators] PR42041: Skip nullpointer successors

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 08:09:33 PDT 2019


kuhar requested changes to this revision.
kuhar added a comment.

Like I mentioned in another thread, I really dislike this approach. The single source of truth about graph traversal in dominators is the `ChildGetter` structure that internally uses `children` and `inverse_children`, and expects them to only return pointers to actual successors/predecessors. It's very weird that `children` and `inverse_children` return nullptrs -- they are not valid graph nodes, and I don't see why this would be desired, despite how unreachable regions are represented in the CFG.

Would it be possible to change some graph traits responsible for `children` and `inverse_children` instead? Or as an alternative, let clang CFG specialize `ChildGetter`? Right now I'm marking this revision with 'request changes', until we explore alternative approaches.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62507/new/

https://reviews.llvm.org/D62507





More information about the llvm-commits mailing list