[PATCH] D17279: [Sink] Don't move calls to readonly functions across stores

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 11:49:55 PST 2016


On Thu, Mar 10, 2016 at 11:36 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:

> nhaehnle added a comment.
>
> In http://reviews.llvm.org/D17279#353238, @dberlin wrote:
>
> > Doesn't AA have an existing API that gives you exactly the info you want
> >  here (Does this call ref the memory touched the things in the store
> list)
>
>
> I see no such interface in AAResults at least. All queries test $something
> against a MemoryLocation, but the Stores are instructions because they
> could also be call sites.


Errr, you should be using the MemoryLocation:;get for actual stores, and CS
for callsites.

So you should just be able to walk the store list and test against that.


> There would have to be an interface to test an instruction against an
> instruction, or two call sites against each other.
>
>
It would just do the above :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/1b7b32df/attachment.html>


More information about the llvm-commits mailing list