aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-24 02:41:19 +0000
committerChris Lattner <sabre@nondot.org>2005-03-24 02:41:19 +0000
commitaff85ac552447aa8f95b3794e26b0207ee45ddff (patch)
tree1b57e9b7917c2afdcd9dd35f9ff6db0ca8cfc9e3 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp
parent85a1d92323473eb09d9d341d12f0b7602bb48ec7 (diff)
downloadllvm-aff85ac552447aa8f95b3794e26b0207ee45ddff.zip
llvm-aff85ac552447aa8f95b3794e26b0207ee45ddff.tar.gz
llvm-aff85ac552447aa8f95b3794e26b0207ee45ddff.tar.bz2
Simplify dead code into a fixme :)
llvm-svn: 20800
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index 5a2f921..40700f9 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -280,19 +280,10 @@ void GlobalsModRef::AnalyzeSCC(std::vector<CallGraphNode *> &SCC) {
ModRefBehavior MRB =
AliasAnalysis::getModRefBehavior(Callee, CallSite());
if (MRB != DoesNotAccessMemory) {
- if (MRB == OnlyReadsMemory && CalleeFR) {
- // This reads memory, but we don't know what, just say that it
- // reads all globals.
- for (std::map<GlobalValue*, unsigned>::iterator
- GI = CalleeFR->GlobalInfo.begin(),
- E = CalleeFR->GlobalInfo.end();
- GI != E; ++GI)
- FR.GlobalInfo[GI->first] |= Ref;
-
- } else {
- CallsExternal = true;
- break;
- }
+ // FIXME: could make this more aggressive for functions that just
+ // read memory. We should just say they read all globals.
+ CallsExternal = true;
+ break;
}
}
} else {