[PATCH] D89632: [DomTree] Accept Value as Def (NFC)
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 12:12:26 PDT 2020
kuhar added a comment.
Interesting idea.
The first question that comes to my mind is what does it mean for and value to dominate a use.
The function-level comment says:
/// Return true if Def dominates a use in User.
this is clear when thinking about CFG-level graph dominance, but globals and arguments are not really present in the CFG. I guess the intention is to actually check if a value is always 'available' before a use, i.e., either executes (as an instruction) in the same function, or 'statically' available in the module. Is this consistent with your patch and understanding, @nikic?
If that's the case, I guess a theoretical way to tie it back to dominance would be to say that these values are defined in the virtual CFG entry which dominates all 'real' function entries (currently exactly one in LLVM IR). We don't currently have virtual entry nodes in dominators, but adding them would have other benefits too (faster re-rooting, support for multiple entry points).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89632/new/
https://reviews.llvm.org/D89632
More information about the llvm-commits
mailing list