Go to file
Anna Thomas 4b027e8f89 [RS4GC] Drop invalid metadata after pointers are relocated
Summary:
After RS4GC, we should drop metadata that is no longer valid. These metadata
is used by optimizations scheduled after RS4GC, and can cause a miscompile.
One such metadata is invariant.load which is used by LICM sinking transform.
After rewriting statepoints, the address of a load maybe relocated. With
invariant.load metadata on a load instruction, LICM sinking assumes the
loaded value (from a dererenceable address) to be invariant, and
rematerializes the load operand and the load at the exit block.
This transforms the IR to have an unrelocated use of the
address after a statepoint, which is incorrect.
Other metadata we conservatively remove are related to
dereferenceability and noalias metadata.

This patch drops such metadata on store and load instructions after
rewriting statepoints.

Reviewers: reames, sanjoy, apilipenko

Reviewed by: reames

Subscribers: llvm-commits

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

llvm-svn: 305234
2017-06-12 21:26:53 +00:00
clang Revert r303316, a change to ExprConstant to evaluate function arguments. 2017-06-12 21:15:44 +00:00
clang-tools-extra [clang-tidy] D33930: Do not pick up by default the LLVM style if passing -format. 2017-06-09 22:23:03 +00:00
compiler-rt [ubsan] Detect invalid unsigned pointer index expression (compiler-rt) 2017-06-12 18:42:51 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc generic: add missing get_work_dim include 2017-06-02 15:58:35 +00:00
libcxx Mark the recent variant test as UNSUPPORTED for C++ before 17 2017-06-12 16:33:41 +00:00
libcxxabi build: use cmake to pass -std=c++11 2017-06-11 23:59:26 +00:00
libunwind [libunwind] Fix executable stack directive on Linux. 2017-05-16 20:18:57 +00:00
lld IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. 2017-06-12 20:10:48 +00:00
lldb Introduce new command: thread backtrace unique 2017-06-12 16:25:24 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [RS4GC] Drop invalid metadata after pointers are relocated 2017-06-12 21:26:53 +00:00
openmp [OpenMP] Prevent unused-variable warning in libomptarget when compiling in Release mode. 2017-06-09 16:46:07 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [www] Remove outdated documentation 2017-06-12 12:21:47 +00:00