llvm-project/llvm
Philip Reames ef51eed37b [LoopDeletion] Handle inner loops w/untaken backedges
This builds on the restricted after initial revert form of D93906, and adds back support for breaking backedges of inner loops. It turns out the original invalidation logic wasn't quite right, specifically around the handling of LCSSA.

When breaking the backedge of an inner loop, we can cause blocks which were in the outer loop only because they were also included in a sub-loop to be removed from both loops. This results in the exit block set for our original parent loop changing, and thus a need for new LCSSA phi nodes.

This case happens when the inner loop has an exit block which is also an exit block of the parent, and there's a block in the child which reaches an exit to said block without also reaching an exit to the parent loop.

(I'm describing this in terms of the immediate parent, but the problem is general for any transitive parent in the nest.)

The approach implemented here involves a potentially expensive LCSSA rebuild.  Perf testing during review didn't show anything concerning, but we may end up needing to revert this if anyone encounters a practical compile time issue.

Differential Revision: https://reviews.llvm.org/D94378
2021-01-22 16:31:29 -08:00
..
benchmarks
bindings
cmake Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference 2021-01-17 12:13:01 +01:00
docs Update filename to workers.py file in documentation 2021-01-22 00:20:26 -08:00
examples [Orc] Fix OrcV2Examples after D94690 2021-01-15 13:45:46 +01:00
include ADT: Use 'using' to inherit assign and append in SmallString 2021-01-22 16:17:58 -08:00
lib [LoopDeletion] Handle inner loops w/untaken backedges 2021-01-22 16:31:29 -08:00
projects
resources
runtimes [CMake] Split the target side of runtimes build 2021-01-11 23:39:36 -08:00
test [LoopDeletion] Handle inner loops w/untaken backedges 2021-01-22 16:31:29 -08:00
tools [LTO] Add support for existing Config::Freestanding option. 2021-01-22 13:45:39 +00:00
unittests ADT: Use 'using' to inherit assign and append in SmallString 2021-01-22 16:17:58 -08:00
utils [gn build] Port 622eaa4a4c 2021-01-22 21:40:40 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [CMake] Remove dead code setting policies to NEW 2021-01-19 17:19:36 +02:00
CODE_OWNERS.TXT Change XCore code owner. 2021-01-14 12:13:48 +00:00
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.