[NFCI][SimplifyCFG] Prefer to add Insert edges before Delete edges into DomTreeUpdate...
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 10 Jan 2021 13:25:15 +0000 (16:25 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 10 Jan 2021 21:30:44 +0000 (00:30 +0300)
commit8e8d214c4a6c417e42996faeb9211a5c2e32111f
tree94e2c72c2c0e4c84b1323fe3b05cd84db86d8e32
parent13dea030b3d794d05a08dd0080c35844c9ca1b30
[NFCI][SimplifyCFG] Prefer to add Insert edges before Delete edges into DomTreeUpdater, if reasonable

This has a measurable impact on the number of DomTree recalculations.
While this doesn't handle all the cases,
it deals with the most obvious ones.
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp