1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm
Serguei Katkov 3c49585e93 [SCEV] Fix isKnownPredicate
IsKnownPredicate is updated to implement the following algorithm
proposed by @sanjoy and @mkazantsev :
isKnownPredicate(Pred, LHS, RHS) {
  Collect set S all loops on which either LHS or RHS depend.
  If S is non-empty
    a. Let PD be the element of S which is dominated by all other elements of S
    b. Let E(LHS) be value of LHS on entry of PD.
       To get E(LHS), we should just take LHS and replace all AddRecs that
       are attached to PD on with their entry values.
       Define E(RHS) in the same way.
    c. Let B(LHS) be value of L on backedge of PD.
       To get B(LHS), we should just take LHS and replace all AddRecs that
       are attached to PD on with their backedge values.
       Define B(RHS) in the same way.
    d. Note that E(LHS) and E(RHS) are automatically available on entry of PD,
       so we can assert on that.
    e. Return true if isLoopEntryGuardedByCond(Pred, E(LHS), E(RHS)) &&
                      isLoopBackedgeGuardedByCond(Pred, B(LHS), B(RHS))
Return true if Pred, L, R is known from ranges, splitting etc.
}
This is follow-up for https://reviews.llvm.org/D42417.

Reviewers: sanjoy, mkazantsev, reames
Reviewed By: sanjoy, mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43507

llvm-svn: 327362
2018-03-13 06:10:27 +00:00
..
ADT [ADT] Shuffle containers before sorting to uncover non-deterministic behavior 2018-03-10 18:59:14 +00:00
Analysis [SCEV] Fix isKnownPredicate 2018-03-13 06:10:27 +00:00
AsmParser LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
BinaryFormat [llvm-readobj][ELF] Move ELF note parsing into libObject 2018-03-12 19:28:50 +00:00
Bitcode bitcode support change for fast flags compatibility 2018-02-19 19:22:28 +00:00
CodeGen Revert: r327172 "Correct load-op-store cycle detection analysis" 2018-03-10 02:16:15 +00:00
Config Fix cmake's multi-config generators after r326738 2018-03-07 19:32:36 +00:00
DebugInfo [DebugInfo/AccelTable] Fix inconsistency in getDIEOffset implementations 2018-03-09 11:58:59 +00:00
Demangle
ExecutionEngine [ORC] Switch to shared_ptr ownership for SymbolSources in VSOs. 2018-02-21 21:55:57 +00:00
FuzzMutate [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus 2018-02-05 11:05:47 +00:00
IR [PatternMatch] enhance m_NaN() to ignore undef elements in vectors 2018-03-12 22:18:47 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker Revert "[IRMover] Implement name based structure type mapping" 2018-02-21 20:12:18 +00:00
LTO Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
MC Delay creating an alias for @@@. 2018-03-09 18:42:25 +00:00
Object [llvm-readobj][ELF] Move ELF note parsing into libObject 2018-03-12 19:28:50 +00:00
ObjectYAML [WebAssembly] Fix broken gcc build after rL326454 2018-03-01 18:48:08 +00:00
Option [COFF] Process /EXPORT option in fastpath 2018-01-09 20:36:42 +00:00
Passes NewPM: Add an extension point for the start of the pipeline. 2018-01-23 01:25:20 +00:00
ProfileData Fix Wdocumentation warning - remove param tag for old argument 2018-02-22 13:28:42 +00:00
Support [Support] Move syntax highlighting into support 2018-03-09 09:56:24 +00:00
TableGen TableGen: Add a defset statement 2018-03-09 12:24:42 +00:00
Target Use branch funnels for virtual calls when retpoline mitigation is enabled. 2018-03-09 19:11:44 +00:00
Testing/Support [Testing/Support] Make the HasValue matcher composable 2017-12-13 10:00:38 +00:00
ToolDrivers
Transforms Remove the LoopInstSimplify pass (-loop-instsimplify) 2018-03-12 20:49:42 +00:00
WindowsManifest
WindowsResource
XRay XRayRecord.h: Add missing #include 2017-11-21 00:23:19 +00:00
CMakeLists.txt
InitializePasses.h Remove the LoopInstSimplify pass (-loop-instsimplify) 2018-03-12 20:49:42 +00:00
LinkAllIR.h
LinkAllPasses.h Rename CountingFunctionInserter and use for both mcount and cygprofile calls, before and after inlining 2017-11-14 21:09:45 +00:00
module.modulemap [WebAssembly] Remove unneeded sub-directory 2017-12-21 03:16:34 +00:00
module.modulemap.build [Modules] Add module for Config/llvm-config.h 2017-10-24 06:18:52 +00:00
Pass.h IR printing improvement for function passes - introducing -print-module-scope 2017-12-01 17:42:46 +00:00
PassAnalysisSupport.h [NFC] fix trivial typos in comments 2018-01-23 05:49:30 +00:00
PassInfo.h
PassRegistry.h
PassSupport.h