]> granicus.if.org Git - llvm/commit
[LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdge
authorMax Kazantsev <max.kazantsev@azul.com>
Fri, 8 Feb 2019 08:12:41 +0000 (08:12 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Fri, 8 Feb 2019 08:12:41 +0000 (08:12 +0000)
commit2c57c1ebcc3b3c83c477c193d51d196f2f3555fe
treef9a7d5720821ef6bc34f024812554c1fbb4d49c6
parentfcb98b7928e8ea2c8b885b16c50a512f3dac1b3c
[LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdge

`insert/deleteEdge` methods in DTU can make updates incorrectly in some cases
(see https://bugs.llvm.org/show_bug.cgi?id=40528), and it is recommended to
use `applyUpdates` methods instead when it is needed to make a mass update in CFG.

Differential Revision: https://reviews.llvm.org/D57316
Reviewed By: kuhar

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353502 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopSimplifyCFG.cpp
test/Transforms/LoopSimplifyCFG/constant-fold-branch.ll