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

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 12:38:13 PDT 2016


nhaehnle updated this revision to Diff 55294.
nhaehnle added a comment.

Update and change to deal with argmemonly.

This required a subtle change to getModRefInfo(Instruction, ImmutableCallSite)
to ensure that the semantics are equal to that of getModRefInfo(CS1, CS2) when
the Instruction is a call-site.

I would consider the old behavior to be a bug, which seems to not have surfaced
because it seems the only user of that particular getModRefInfo overload is in
MemorySSA, and that user only checks the return value for != MR_NoModRef.

While the relation is non-commutative, changing the order of the call-sites
may change the result from MR_Ref to MR_Mod and vice versa, but never to
MR_NoModRef.


http://reviews.llvm.org/D17279

Files:
  lib/Analysis/AliasAnalysis.cpp
  lib/Transforms/Scalar/Sink.cpp
  test/Transforms/Sink/call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17279.55294.patch
Type: text/x-patch
Size: 4097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/5cf54c74/attachment.bin>


More information about the llvm-commits mailing list