aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2021-04-11 22:39:22 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2021-04-11 23:56:22 +0300
commit2def9c3d8ed9df5a5dc737343c891ac17de1afc1 (patch)
tree29fdc151e4bb56e38e7e30d5fe184e643b809abf /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent6d44b3c56d4a80b16f144a52bc841111c0b4d2c2 (diff)
downloadllvm-2def9c3d8ed9df5a5dc737343c891ac17de1afc1.zip
llvm-2def9c3d8ed9df5a5dc737343c891ac17de1afc1.tar.gz
llvm-2def9c3d8ed9df5a5dc737343c891ac17de1afc1.tar.bz2
[NFCI][Local] TryToSimplifyUncondBranchFromEmptyBlock(): improve Dominator Tree updating
First, we don't need vector-ness for the predecessor lists. Secondly, like elsewhere, do insertions before deletions. Lastly, the check that we actually need to insert an edge, that it doesn't exist already, is backwards. Instead of looking at successors of every single 'PredOfBB', just always look at predecessors of the 'Succ'. The result is always the same, but we avoid *really* inefficient code.
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions