1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/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 [AggressiveInstCombine] Generalize foldGuardedRotateToFunnelShift to generic funnel shifts (REAPPLIED) 2020-12-21 15:22:27 +00:00
CFGuard llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
Coroutines Add a llvm.coro.end.async intrinsic 2020-12-22 10:52:28 -08:00
Hello
HelloNew llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
InstCombine Use unary CreateShuffleVector if possible 2020-12-30 22:36:08 +09:00
Instrumentation [PGO] Use isa instead of dyn_cast (NFC) 2020-12-30 17:45:38 -08:00
IPO Fix LLVM_ENABLE_MODULES=On build 2020-12-30 10:54:04 -08:00
ObjCARC [ObjC][ARC] Fix a bug where the inline-asm retain/claim RV marker wasn't 2020-12-18 16:59:06 -08:00
Scalar [LoopDeletion] Allows deletion of possibly infinite side-effect free loops 2020-12-30 21:43:01 -05:00
Utils [LoopDeletion] Allows deletion of possibly infinite side-effect free loops 2020-12-30 21:43:01 -05:00
Vectorize [LoopUtils] reduce FMF and min/max complexity when forming reductions 2020-12-30 15:22:26 -05:00
CMakeLists.txt Reland [docs][NewPM] Add docs for writing NPM passes 2020-09-14 16:06:19 -07:00