[PATCH] llvm.noalias - BasicAA should look through them too

hfinkel at anl.gov hfinkel at anl.gov
Thu Apr 30 10:13:01 PDT 2015


================
Comment at: include/llvm/IR/Value.h:404
@@ -405,1 +403,3 @@
+  const Value *stripPointerCasts(bool LookThroughNoAlias = false) const {
+    return const_cast<Value*>(this)->stripPointerCasts(LookThroughNoAlias);
   }
----------------
dberlin wrote:
> So, is there actually a place you plan on not passing true here, or are you just trying to keep existing logic where you haven't explicitly modified it?
> 
> 
> (Because i am having a bit of trouble seeing where you would want to pass false.  At the point you are stripping, why is noalias more magical to not strip than anything else that can appear here?)
> 
In some sense both, but I also wanted to keep the default not to strip them.

At least in theory, looking through casts and stripping llvm.noalias calls could lead to rewriting the pointer in terms of some underlying object (thus removing the aliasing information) -- SROA might do this for example -- and so I thought it would be easier to vet specific uses that we know won't do this.

Generically, I thought that "I added restrict and my code slowed down" will be easier to correct than "I added restrict and my code did not speed up as it should have".

We could certainly change the default (and thus remove the need for several of the patches in this series ;) ). I don't have a strong opinion.

http://reviews.llvm.org/D9383

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list