1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/include/llvm/Transforms
Atmn Patel 6de5f0f936 [LoopDeletion] Allows deletion of possibly infinite side-effect free loops
From C11 and C++11 onwards, a forward-progress requirement has been
introduced for both languages. In the case of C, loops with non-constant
conditionals that do not have any observable side-effects (as defined by
6.8.5p6) can be assumed by the implementation to terminate, and in the
case of C++, this assumption extends to all functions. The clang
frontend will emit the `mustprogress` function attribute for C++
functions (D86233, D85393, D86841) and emit the loop metadata
`llvm.loop.mustprogress` for every loop in C11 or later that has a
non-constant conditional.

This patch modifies LoopDeletion so that only loops with
the `llvm.loop.mustprogress` metadata or loops contained in functions
that are required to make progress (`mustprogress` or `willreturn`) are
checked for observable side-effects. If these loops do not have an
observable side-effect, then we delete them.

Loops without observable side-effects that do not satisfy the above
conditions will not be deleted.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D86844
2020-12-30 21:43:01 -05:00
..
AggressiveInstCombine
Coroutines [Coroutines] Remove unused includes. NFC. 2020-09-28 10:27:23 +02:00
HelloNew Reland [docs][NewPM] Add docs for writing NPM passes 2020-09-14 16:06:19 -07:00
InstCombine [InstCombine] Disable unsafe select transform behind a flag 2020-12-28 22:43:52 +01:00
Instrumentation [MemProf][NewPM] Make memprof passes required 2020-11-13 15:15:27 -08:00
IPO [IROutliner] Adding option to enable outlining from linkonceodr functions 2020-12-30 12:08:04 -06:00
Scalar [NewPM] Port infer-address-spaces 2020-12-28 19:58:12 -08:00
Utils [LoopDeletion] Allows deletion of possibly infinite side-effect free loops 2020-12-30 21:43:01 -05:00
Vectorize [SVE] Add support for scalable vectors with vectorize.scalable.enable loop attribute 2020-12-02 13:23:43 +00:00
CFGuard.h
Coroutines.h [Coroutines] Reuse storage for local variables with non-overlapping lifetimes 2020-09-28 15:48:00 +08:00
Instrumentation.h
IPO.h [IRSim][IROutliner] Adding the extraction basics for the IROutliner. 2020-12-17 11:27:26 -06:00
ObjCARC.h Port -objc-arc-expand to NPM 2020-10-26 20:05:10 -07:00
Scalar.h [ScalarizeMaskedMemIntrin] Add new PM support 2020-12-08 17:15:22 -05:00
Utils.h [NPM] Port strip nonlinetable debuginfo pass to the new pass manager 2020-10-07 14:35:36 -07:00
Vectorize.h