1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/Transforms
Philip Reames 973d963687 [LoopPred/WC] Use a dominating widenable condition to remove analyze loop exits
This implements a version of the predicateLoopExits transform from IndVarSimplify extended to exploit widenable conditions - and thus be much wider in scope of legality. The code structure ends up being almost entirely different, so I chose to duplicate this into the LoopPredication pass instead of trying to reuse the code in the IndVars.

The core notions of the transform are as follows:

    If we have a widenable condition which controls entry into the loop, we're allowed to widen it arbitrarily. Given that, it's simply a *profitability* question as to what conditions to fold into the widenable branch.
    To avoid pass ordering issues, we want to avoid widening cases that would otherwise be dischargeable. Or... widen in a form which can still be discharged. Thus, we phrase the transform as selecting one analyzeable exit from the set of analyzeable exits to keep. This avoids creating pass ordering complexities.
    Since none of the above proves that we actually exit through our analyzeable exits - we might exit through something else entirely - we limit ourselves to cases where a) the latch is analyzeable and b) the latch is predicted taken, and c) the exit being removed is statically cold.

Differential Revision: https://reviews.llvm.org/D69830
2019-11-18 11:23:29 -08:00
..
AggressiveInstCombine Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CFGuard Convert files added in d157a9bc8ba1 to unix line endings. 2019-10-28 14:39:45 -04:00
Coroutines Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Hello
InstCombine [ARM,MVE] Add InstCombine rules for pred_i2v / pred_v2i. 2019-11-18 10:39:30 +00:00
Instrumentation [GCOV] Skip artificial functions from being emitted 2019-11-15 14:23:11 -05:00
IPO [Attributor] Use nofree argument attribute for heap-to-stack conversion 2019-11-17 21:35:04 +01:00
ObjCARC llvm/ObjCARC: Split OptimizeIndividualCallImpl out of OptimizeIndividualCalls, NFC 2019-11-17 21:54:27 -08:00
Scalar [LoopPred/WC] Use a dominating widenable condition to remove analyze loop exits 2019-11-18 11:23:29 -08:00
Utils [SimplifyCFG] propagate fast-math-flags (FMF) from phi to select 2019-11-17 11:23:44 -05:00
Vectorize Revert "[LoadStoreVectorize] Use '||' instead of '|' between sides with function calls. NFCI." 2019-11-15 12:49:35 -08:00
CMakeLists.txt Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00
LLVMBuild.txt Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00