This is an archive of the discontinued LLVM Phabricator instance.

GlobalsAA: Functions with the argmemonly attribute won't read arbitrary globals
ClosedPublic

Authored by tstellarAMD on Jun 13 2016, 7:56 PM.

Details

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

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to GlobalsAA: Functions with the argmemonly attribute won't read arbitrary globals.
tstellarAMD updated this object.
tstellarAMD added reviewers: hfinkel, jmolloy.
tstellarAMD added a subscriber: llvm-commits.

Simplify the tests cases.

For the testcase, maybe try passing "-disable-basicaa"? Or maybe come up with something BasicAA can't analyze, like a call to a function which calls an argmemonly function.

Pass -disable-basicaa to opt. The testcase now fails with ToT, but passes with this patch.

For the testcase, maybe try passing "-disable-basicaa"? Or maybe come up with something BasicAA can't analyze, like a call to a function which calls an argmemonly function.

Thanks for the tip. -disable-basicaa makes the testcase depend on this change now.

hfinkel accepted this revision.Jul 5 2016, 2:06 PM
hfinkel edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 5 2016, 2:06 PM
This revision was automatically updated to reflect the committed changes.