diff options
| author | Duncan Sands <baldrick@free.fr> | 2008-09-11 19:35:55 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2008-09-11 19:35:55 +0000 |
| commit | d4133ac31535ce5176f97e9fc81825af8a808760 (patch) | |
| tree | 7c70bf8ac54559c59114e197616d2800eccee241 /llvm/lib/Analysis | |
| parent | 08fedcbcbb2dd64bc9482067fee29ff5ef215bb0 (diff) | |
| download | bcm5719-llvm-d4133ac31535ce5176f97e9fc81825af8a808760.tar.gz bcm5719-llvm-d4133ac31535ce5176f97e9fc81825af8a808760.zip | |
Intrinsics don't touch internal global variables
(unless passed one via a parameter), even if they
are IntrWriteMem.
llvm-svn: 56115
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index 6063a1d16b7..6736e6f3ce4 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/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; } |

