GlobalsAA: Functions with the argmemonly attribute won't read arbitrary globals
authorTom Stellard <thomas.stellard@amd.com>
Thu, 14 Jul 2016 15:50:27 +0000 (15:50 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 14 Jul 2016 15:50:27 +0000 (15:50 +0000)
commit1b5cf6217e8e829bd6af02dad408d30f553897b5
treee8d4e44a8d84d53485409d3176c4934f756fa7a4
parent5bb284226be4556957832fbfed38700d06129639
GlobalsAA: Functions with the argmemonly attribute won't read arbitrary globals

Summary:
In preparation for changing GlobalsAA to stop assuming that intrinsics
can't read arbitrary globals, we need to make sure GlobalsAA is querying
function attributes rather than relying on this assumption.

This patch was inspired by: http://reviews.llvm.org/D20206

Reviewers: jmolloy, hfinkel

Subscribers: eli.friedman, llvm-commits

Differential Revision: https://reviews.llvm.org/D21318

llvm-svn: 275433
llvm/lib/Analysis/GlobalsModRef.cpp
llvm/test/Analysis/GlobalsModRef/func-memattributes.ll [new file with mode: 0644]