1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/LoopIdiom
Dan Gohman 39c48b9d3e Add an @llvm.sideeffect intrinsic
This patch implements Chandler's idea [0] for supporting languages that
require support for infinite loops with side effects, such as Rust, providing
part of a solution to bug 965 [1].

Specifically, it adds an `llvm.sideeffect()` intrinsic, which has no actual
effect, but which appears to optimization passes to have obscure side effects,
such that they don't optimize away loops containing it. It also teaches
several optimization passes to ignore this intrinsic, so that it doesn't
significantly impact optimization in most cases.

As discussed on llvm-dev [2], this patch is the first of two major parts.
The second part, to change LLVM's semantics to have defined behavior
on infinite loops by default, with a function attribute for opting into
potential-undefined-behavior, will be implemented and posted for review in
a separate patch.

[0] http://lists.llvm.org/pipermail/llvm-dev/2015-July/088103.html
[1] https://bugs.llvm.org/show_bug.cgi?id=965
[2] http://lists.llvm.org/pipermail/llvm-dev/2017-October/118632.html

Differential Revision: https://reviews.llvm.org/D38336

llvm-svn: 317729
2017-11-08 21:59:51 +00:00
..
AMDGPU
ARM The patch adds CTLZ idiom recognition. 2017-05-15 19:08:56 +00:00
X86 [Atomics] Rename and change prototype for atomic memcpy intrinsic 2017-06-16 14:43:59 +00:00
basic-address-space.ll
basic.ll [LIR] Teach LIR to avoid extending the BE count prior to adding one to 2017-07-25 10:48:32 +00:00
crash.ll
ctpop-multiple-users-crash.ll
debug-line.ll Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
int_sideeffect.ll Add an @llvm.sideeffect intrinsic 2017-11-08 21:59:51 +00:00
lir-heurs-multi-block-loop.ll
memset_noidiom.ll
non-canonical-loop.ll
non-integral-pointers.ll
nontemporal_store.ll
pr28196.ll
pr33114.ll [LIR] Strengthen the check for recurrence variable in popcnt/CTLZ. 2017-05-23 22:32:56 +00:00
scev-invalidation.ll
struct_pattern.ll
struct.ll
unordered-atomic-memcpy-noarch.ll [Atomics] Rename and change prototype for atomic memcpy intrinsic 2017-06-16 14:43:59 +00:00
unroll.ll
unsafe.ll [LoopIdiom] check for safety while expanding 2017-05-05 14:49:45 +00:00
unwind.ll