[NFC][BasicBlockUtils] Refactor GetIfCondition() to return the branch, not it's condition
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 23 Jul 2021 19:29:04 +0000 (22:29 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 23 Jul 2021 21:18:26 +0000 (00:18 +0300)
commit2aa2fdeed9dc8af922e424545eae56d81c10599f
treed790de9dbaa661b6ab85711d511be0dc4474e606
parentc45e17f11f508d1aea97eded3f1bda2a448f2032
[NFC][BasicBlockUtils] Refactor GetIfCondition() to return the branch, not it's condition

Otherwise e.g. the FoldTwoEntryPHINode() has to do a lot of legwork
to re-deduce what is the dominant block (i.e. for which block
is this branch the terminator).
llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
llvm/lib/Transforms/Utils/FlattenCFG.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp