1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib
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
..
Analysis [InstSimplify] peek through unsigned FP casts for sign-bit compares (PR36682) 2018-03-15 16:17:46 +00:00
AsmParser Make the LLParser accept call instructions of variables in the program AS 2018-02-27 11:15:11 +00:00
BinaryFormat DWARF: Unify form size handling code 2018-03-14 09:39:54 +00:00
Bitcode [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
CodeGen Revert r327620 "[CodeView] Initial support for emitting S_BLOCK32 symbols for lexical scopes" 2018-03-15 20:12:16 +00:00
DebugInfo Refactor the PDB HashTable class. 2018-03-15 17:38:26 +00:00
Demangle
ExecutionEngine [ORC] Re-apply r327566 with a fix for test-global-ctors.ll. 2018-03-15 00:30:14 +00:00
Fuzzer
FuzzMutate
IR [ConstantFolding, InstSimplify] Handle more vector GEPs 2018-03-15 16:00:29 +00:00
IRReader
LineEditor
Linker [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
LTO [LTO] Return proper error object rather than null LTOModule 2018-03-13 04:37:01 +00:00
MC [MC] Always emit relocations for same-section function references 2018-03-14 19:24:32 +00:00
Object [WebAssembly] Identify COMDATs by index rather than string. NFC 2018-03-14 15:44:45 +00:00
ObjectYAML Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
Option [NFC] Replace iterators in PrintHelp with range-based for 2018-03-12 18:31:07 +00:00
Passes [New PM][IRCE] port of Inductive Range Check Elimination pass to the new pass manager 2018-03-15 11:01:19 +00:00
ProfileData [SampleFDO] Extend SampleProfReader to handle demangled names. 2018-03-07 16:45:33 +00:00
Support Fix compilation on Darwin with expensive checks. 2018-03-12 11:01:05 +00:00
TableGen TableGen: Explicitly forbid some nestings of class, multiclass, and foreach 2018-03-14 11:01:01 +00:00
Target [AArch64] Adjust the cost model for Exynos M3 2018-03-15 20:37:32 +00:00
Testing
ToolDrivers
Transforms [LICM] Ignore exits provably not taken on first iteration when computing must execute 2018-03-15 21:04:28 +00:00
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt