[PATCH] D91767: [DomTree][NFC] Introduce function that finds common dom of multiple instructions
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 00:54:59 PST 2020
mkazantsev added a comment.
I see the deep API problem here now. Current `dominates(Value *, Instruction *)` should not be called like that (at least because it returns `false` for `dominates(X, X)`). It has a different semantics, and should be called something like "canBeUserOf".
The clear definition of dominance between two instructions is also something fishy. Specifically, it is fishy for Phi nodes from the same block (there is no precedence between them). Maybe the best name to express what we need in this patch would be `comesBefore`.
It looks like a vast rework of whole DomTree API. I'm OK doing that, but do not want to have my patches waiting for this API rework (they honestly don't need). Let's unblock this branch first and then think how to name it better.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91767/new/
https://reviews.llvm.org/D91767
More information about the llvm-commits
mailing list