diff options
author | Florian Hahn <flo@fhahn.com> | 2022-03-18 08:54:44 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-03-18 08:54:44 +0000 |
commit | 4a699ae9c6a6fde93ec4714d79025df58eb62a72 (patch) | |
tree | ebef02bdcaca97f2242bbd1476220a05af0f7567 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 42e8e00189be787b4d916c6d297a8315998c7687 (diff) | |
download | llvm-4a699ae9c6a6fde93ec4714d79025df58eb62a72.zip llvm-4a699ae9c6a6fde93ec4714d79025df58eb62a72.tar.gz llvm-4a699ae9c6a6fde93ec4714d79025df58eb62a72.tar.bz2 |
[LoopSimplifyCFG] Check predecessors of exits before marking them dead.
LoopSimplifyCFG may process loops that are not in
loop-simplify/canonical form. For loops not in canonical form, exit
blocks may be reachable from non-loop blocks and we cannot consider them
as dead if they only are not reachable from the loop itself.
Unfortunately the smallest test I could come up with requires running
multiple passes:
-passes='loop-mssa(loop-instsimplify,loop-simplifycfg,simple-loop-unswitch)'
The reason is that loops are canonicalized at the beginning of loop
pipelines, so a later transform has to break canonical form in a way
that breaks LoopSimplifyCFG's dead-exit analysis.
Alternatively we could try to require all loop passes to maintain
canonical form. That in turn would also require additional verification.
Fixes #54023, #49931.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D121925
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions