[PATCH] D91767: [DomTree][NFC] Introduce function that finds common dom of multiple instructions
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 22 22:57:36 PST 2020
kuhar added a comment.
In D91767#2410450 <https://reviews.llvm.org/D91767#2410450>, @mkazantsev wrote:
> You can find the planned user in dependencies stack: https://reviews.llvm.org/D90456
>
> I need the common dom to find the latest context where we can prove predicate so that it's also true for all given instructions.
What do you think about defining and implementing `bool dominates(Inst, Inst)` at the same time (or before) `findNCDInst`? IMO it's awkward to explain what finding the NCD of instructions means without first defining dominance between instructions. Then you can use that definition as a post-condition for `findNCDInst` and check that the result dominates all `Insns`. Similarly, I'd also implement findNCD for multiple blocks first and then use it in the version for instructions. Otherwise I'd see it as building something very specific without laying out all the foundations first.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91767/new/
https://reviews.llvm.org/D91767
More information about the llvm-commits
mailing list