Go to file
Peter Collingbourne 7dd8dbf486 Introduce llvm.load.relative intrinsic.
This intrinsic takes two arguments, ``%ptr`` and ``%offset``. It loads
a 32-bit value from the address ``%ptr + %offset``, adds ``%ptr`` to that
value and returns it. The constant folder specifically recognizes the form of
this intrinsic and the constant initializers it may load from; if a loaded
constant initializer is known to have the form ``i32 trunc(x - %ptr)``,
the intrinsic call is folded to ``x``.

LLVM provides that the calculation of such a constant initializer will
not overflow at link time under the medium code model if ``x`` is an
``unnamed_addr`` function. However, it does not provide this guarantee for
a constant initializer folded into a function body. This intrinsic can be
used to avoid the possibility of overflows when loading from such a constant.

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

llvm-svn: 267223
2016-04-22 21:18:02 +00:00
clang Fix a bug involving deferred decl emission and PCH 2016-04-22 18:46:33 +00:00
clang-tools-extra [clang-tidy] fix link in Release Notes 2016-04-22 14:43:39 +00:00
compiler-rt [sanitizer] allow zero first parameter in MmapNoAccess; This is a part of r267094 that has been reverted 2016-04-22 20:05:52 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc prepare-builtins: Remove call to getGlobalContext() 2016-04-15 14:18:58 +00:00
libcxx Fix some non-standard parts of our test suite. Reported by STL 2016-04-22 10:33:56 +00:00
libcxxabi Enable testing for static libc++abi 2016-04-19 12:47:38 +00:00
libunwind unwind: unify some more macros 2016-04-22 17:11:05 +00:00
lld Remove unused #include. 2016-04-22 21:17:55 +00:00
lldb Renumber ThreadSanitizer-provided thread IDs to match LLDB thread numbers. 2016-04-22 10:40:14 +00:00
llgo benchcomp: Add a mode for analyzing rule execution time in ninja log files. 2016-04-08 22:42:22 +00:00
llvm Introduce llvm.load.relative intrinsic. 2016-04-22 21:18:02 +00:00
openmp [ITTNOTIFY] Remove serialized parallel regions from frame notification 2016-04-19 16:55:17 +00:00
polly Bail for complex execution contexts of invariant loads 2016-04-22 11:41:14 +00:00