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

Igor Laevsky via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 11:22:46 PDT 2015


igor-laevsky 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);
----------------
sanjoy wrote:
> 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.
I intentionally named this similar as the analogous Function method. Besides consistency it is also required for correctness - `RemoveNonValidAttrAtIndex` should work both on Function's and CallSite's.

In order to solve this I can rename both methods in a separate change. Or alternatively I can restructure code in RS4GC to not rely on similar naming in Function and CallSite.

Bit I am leaning toward leaving things as-is. Llvm lived for quite some time with doesNotAlias naming and probably people already used to it.

I have fixed comment in the updated diff.


http://reviews.llvm.org/D14032





More information about the llvm-commits mailing list