aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-09-11 19:35:55 +0000
committerDuncan Sands <baldrick@free.fr>2008-09-11 19:35:55 +0000
commit892b84007c980e58181cd94fea7d70c5ed9642c8 (patch)
tree8bb21b22199b56ed6107906434adfea77ba03848 /lib/Analysis/IPA/GlobalsModRef.cpp
parentbcb37fd22f0345bdfd30c57e8a7f22fc6080e20a (diff)
Intrinsics don't touch internal global variables
(unless passed one via a parameter), even if they are IntrWriteMem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index 6063a1d16b..6736e6f3ce 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -392,8 +392,10 @@ void GlobalsModRef::AnalyzeCallGraph(CallGraph &CG, Module &M) {
FR.GlobalInfo[*GI] |= Ref;
}
} else {
- // Can't say anything useful.
- KnowNothing = true;
+ FunctionEffect |= ModRef;
+ // Can't say anything useful unless it's an intrinsic - they don't
+ // read or write global variables of the kind considered here.
+ KnowNothing = !F->isIntrinsic();
}
continue;
}