1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
Go to file
Philip Reames 737e426e96 [LICM] Ignore exits provably not taken on first iteration when computing must execute
It is common to have conditional exits within a loop which are known not to be taken on some iterations, but not necessarily all. This patches extends our reasoning around guaranteed to execute (used when establishing whether it's safe to dereference a location from the preheader) to handle the case where an exit is known not to be taken on the first iteration and the instruction of interest *is* known to be taken on the first iteration.

This case comes up in two major ways:
* If we have a range check which we've been unable to eliminate, we frequently know that it doesn't fail on the first iteration.
* Pass ordering. We may have a check which will be eliminated through some sequence of other passes, but depending on the exact pass sequence we might never actually do so or we might miss other optimizations from passes run before the check is finally eliminated.

The initial version (here) is implemented via InstSimplify. At the moment, it catches a few cases, but misses a lot too. I added test cases for missing cases in InstSimplify which I'll follow up on separately. Longer term, we should probably wire SCEV through to here to get much smarter loop aware simplification of the first iteration predicate.

Differential Revision: https://reviews.llvm.org/D44287

llvm-svn: 327664
2018-03-15 21:04:28 +00:00
bindings [LLVM-C] [bindings/go] Add C and Golang bindings for COMDAT 2018-03-14 18:33:53 +00:00
cmake Export LLVM_DYLIB_COMPONENTS in LLVMConfig.cmake 2018-03-14 09:28:38 +00:00
docs TableGen: Add !ne, !le, !lt, !ge, and !gt comparisons 2018-03-14 11:00:57 +00:00
examples [ORC] Re-apply r327566 with a fix for test-global-ctors.ll. 2018-03-15 00:30:14 +00:00
include Move some function declarations higher so they can be found. 2018-03-15 17:56:44 +00:00
lib [LICM] Ignore exits provably not taken on first iteration when computing must execute 2018-03-15 21:04:28 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes [CMake] Support for cross-compilation when build runtimes 2018-01-08 23:50:59 +00:00
test [LICM] Ignore exits provably not taken on first iteration when computing must execute 2018-03-15 21:04:28 +00:00
tools Refactor the PDB HashTable class. 2018-03-15 17:38:26 +00:00
unittests Refactor the PDB HashTable class. 2018-03-15 17:38:26 +00:00
utils [UpdateTestChecks] Handle IR variables with a '-' in the name 2018-03-14 20:28:53 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy
.gitattributes [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true. 2017-11-17 21:59:43 +00:00
.gitignore
CMakeLists.txt build: add the ability to create a symlink for dsymutil 2018-02-28 23:00:50 +00:00
CODE_OWNERS.TXT Update my email addresses, NFC. 2017-10-26 10:16:54 +00:00
configure
CREDITS.TXT Add myself to CREDITS.txt 2018-01-29 17:02:34 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit access 2017-08-18 02:39:28 +00:00
RELEASE_TESTERS.TXT Update my email addresses, NFC. 2017-10-26 10:16:54 +00:00

Low Level Virtual Machine (LLVM)
================================

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.