[NFCI] SimplifyCFGPass: mergeEmptyReturnBlocks(): use DeleteDeadBlocks()
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 19 May 2021 08:31:53 +0000 (11:31 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 19 May 2021 08:32:24 +0000 (11:32 +0300)
commit729e18cbf498fb9b95fd672691ee8c7b7926f674
tree3fc639f5ba1b6bf26789cfc936da5c547901ff31
parent9f36306cc9ac6d1d1019831d40865d0d54563379
[NFCI] SimplifyCFGPass: mergeEmptyReturnBlocks(): use DeleteDeadBlocks()

In this case, it does the same thing as the original pattern does.

SimplifyCFG has a few lurking miscompilations about deleting blocks that
have their address taken, and consistently using DeleteDeadBlocks() instead
 of a hand-rolled pattern will allow to weed those cases out easierly.
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp