[PATCH] D14032: [RS4GC] Strip noalias attribute after statepoint rewrite

Igor Laevsky via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 17:01:48 PDT 2015


igor-laevsky created this revision.
igor-laevsky added a reviewer: sanjoy.
igor-laevsky added a subscriber: llvm-commits.
Herald added a subscriber: sanjoy.

We should remove noalias along with dereference and dereference_or_null attributes. Problem is that statepoint could potentially touch the entire heap including noalias objects. For example in this piece of code:
```
  %obj = call noalias %jObject* new_instance(...)
  store %val, %obj ; last use of %obj
  call gc.statepoint()
```
Llvm will consider that %obj and statepoint call do not alias and move store after the statepoint.

http://reviews.llvm.org/D14032

Files:
  include/llvm/IR/CallSite.h
  include/llvm/IR/Instructions.h
  lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  test/Transforms/RewriteStatepointsForGC/deref-pointers.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14032.38276.patch
Type: text/x-patch
Size: 5241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151024/0fb4ef29/attachment.bin>


More information about the llvm-commits mailing list