diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-12-19 22:23:35 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-12-20 00:18:36 +0300 |
commit | c043f5055e8968ed17d2763e47862c42050302e3 (patch) | |
tree | 2caffe4889d3350bbee08c3b935f185c0ac63ed5 /llvm/lib/Transforms/Utils/LoopSimplify.cpp | |
parent | 262ff9c23e72643ba02db6166b6ca942ef067dc9 (diff) | |
download | llvm-c043f5055e8968ed17d2763e47862c42050302e3.zip llvm-c043f5055e8968ed17d2763e47862c42050302e3.tar.gz llvm-c043f5055e8968ed17d2763e47862c42050302e3.tar.bz2 |
[SimplifyCFG] Teach FoldBranchToCommonDest() to preserve DomTree, part 1
... for conditional branch case
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopSimplify.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp index 817dfc2..6337a01 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp @@ -681,7 +681,7 @@ ReprocessLoop: // The block has now been cleared of all instructions except for // a comparison and a conditional branch. SimplifyCFG may be able // to fold it now. - if (!FoldBranchToCommonDest(BI, MSSAU)) + if (!FoldBranchToCommonDest(BI, /*DTU=*/nullptr, MSSAU)) continue; // Success. The block is now dead, so remove it from the loop, |