1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Go to file
Sanjoy Das 479a57ca4a New pass: guard widening
Summary:
Implement guard widening in LLVM. Description from GuardWidening.cpp:

The semantics of the `@llvm.experimental.guard` intrinsic lets LLVM
transform it so that it fails more often that it did before the
transform.  This optimization is called "widening" and can be used hoist
and common runtime checks in situations like these:

```
%cmp0 = 7 u< Length
call @llvm.experimental.guard(i1 %cmp0) [ "deopt"(...) ]
call @unknown_side_effects()
%cmp1 = 9 u< Length
call @llvm.experimental.guard(i1 %cmp1) [ "deopt"(...) ]
...
```

to

```
%cmp0 = 9 u< Length
call @llvm.experimental.guard(i1 %cmp0) [ "deopt"(...) ]
call @unknown_side_effects()
...
```

If `%cmp0` is false, `@llvm.experimental.guard` will "deoptimize" back
to a generic implementation of the same function, which will have the
correct semantics from that point onward.  It is always _legal_ to
deoptimize (so replacing `%cmp0` with false is "correct"), though it may
not always be profitable to do so.

NB! This pass is a work in progress.  It hasn't been tuned to be
"production ready" yet.  It is known to have quadriatic running time and
will not scale to large numbers of guards

Reviewers: reames, atrick, bogner, apilipenko, nlewycky

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D20143

llvm-svn: 269997
2016-05-18 22:55:34 +00:00
bindings Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
cmake Work around a glibc bug: backtrace() spuriously fails if 2016-05-18 22:26:36 +00:00
docs docs: Update and clean up BitCodeFormat.rst. 2016-05-17 22:30:58 +00:00
examples [Orc] Rename OrcArchitectureSupport to OrcABISupport and add Win32 ABI support. 2016-05-07 03:36:38 +00:00
include New pass: guard widening 2016-05-18 22:55:34 +00:00
lib New pass: guard widening 2016-05-18 22:55:34 +00:00
projects
resources
test New pass: guard widening 2016-05-18 22:55:34 +00:00
tools Delete Reloc::Default. 2016-05-18 22:04:49 +00:00
unittests Delete Reloc::Default. 2016-05-18 22:04:49 +00:00
utils Fix Clang-tidy modernize-use-bool-literals in generated Target code; other minor fixes; other minor fixes. 2016-05-17 17:04:23 +00:00
.arcconfig
.clang-format
.clang-tidy Don't use misc-unused-parameters check on LLVM. 2016-04-13 08:58:52 +00:00
.gitignore
CMakeLists.txt Remove LLVM_ENABLE_TIMESTAMPS 2016-05-05 19:57:03 +00:00
CODE_OWNERS.TXT Update my email address. 2016-05-10 16:23:54 +00:00
configure
CREDITS.TXT Update my email address. 2016-05-10 16:23:54 +00:00
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:41:06 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.