Rather than marking all internal globals "Ref"
authorDuncan Sands <baldrick@free.fr>
Fri, 12 Sep 2008 07:29:58 +0000 (07:29 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 12 Sep 2008 07:29:58 +0000 (07:29 +0000)
commit2bb4a4d31590c1d3c7b620d7ab6959af05920cd5
tree7c0108400edf907fc3fae616bec501c37843d781
parente2f2083f9ca6f9a9a9d7dbb75d59a779a0452f4a
Rather than marking all internal globals "Ref"
when a readonly declaration is called, set a
flag.  This is faster and uses less memory.
In theory it is less accurate, because before
only those internal globals that were read
by someone were being marked "Ref", but now
all are.  But in practice, thanks to other
passes, all internal globals of the kind
considered here will be both read and stored
to: those only read will have been turned
into constants, and those only stored to will
have been deleted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56143 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/GlobalsModRef.cpp