[PATCH] D14032: [RS4GC] Strip noalias attribute after statepoint rewrite
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 22:48:59 PDT 2015
sanjoy added inline comments.
================
Comment at: include/llvm/IR/Instructions.h:1623
@@ +1622,3 @@
+ /// @param n The parameter to check. 1 is the first parameter, 0 is the return
+ bool doesNotAlias(unsigned n) const {
+ return AttributeList.hasAttribute(n, Attribute::NoAlias);
----------------
I'd prefer a name like `isNoAlias`, since `doesNotAlias` begs the question "does not alias what?".
And I think the ` does not alias other parameters` bit is not accurate for return values.
================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:118
@@ -117,2 +117,3 @@
/// dereferenceability.
- ///
+ /// Similar thing also applies to the noalias attributes. gc.tatepoint can
+ /// touch the entire heap including noalias objects.
----------------
Nit: gc.statepoint
================
Comment at: test/Transforms/RewriteStatepointsForGC/deref-pointers.ll:71
@@ -68,1 +70,3 @@
+define i8 addrspace(1)* @test_noalias_arg(i8 addrspace(1)* noalias %a) gc "statepoint-example" {
+; CHECK: define i8 addrspace(1)* @test_noalias_arg(i8 addrspace(1)* %a)
----------------
Can I ask you to please add these tests to the deopt-bundles directory as well? If that's too much work, please add a "TODO also test for noalias" in `deopt-bundles/deref-pointers.ll`; and I'll port the tests once they're in tree.
http://reviews.llvm.org/D14032
More information about the llvm-commits
mailing list