Ignore loads from and stores to local memory (i.e. allocas)
authorDuncan Sands <baldrick@free.fr>
Sat, 4 Oct 2008 13:24:24 +0000 (13:24 +0000)
committerDuncan Sands <baldrick@free.fr>
Sat, 4 Oct 2008 13:24:24 +0000 (13:24 +0000)
commitc82b6a1ed2496ce0d61d2e51ed3a4cac4db786da
tree64fec2d7d3157af9f6595b2bc6e554a543e201b9
parent26e4b216c0c065dece616c1c9931252e2a0e40c6
Ignore loads from and stores to local memory (i.e. allocas)
when deciding whether to mark a function readnone/readonly.
Since the pass is currently run before SROA, this may be
quite helpful.  Requested by Chris on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57050 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/AddReadAttrs.cpp
test/Transforms/AddReadAttrs/2008-10-04-LocalMemory.ll [new file with mode: 0644]