summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Analysis/GlobalsModRef.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-01-06 20:19:13 +0000
committerdim <dim@FreeBSD.org>2016-01-06 20:19:13 +0000
commite06c171d67ab436f270b15f7e364a8d8f77c01f2 (patch)
treeb7c03c042b220d85a294b0e2e89936b631d3e6ad /contrib/llvm/lib/Analysis/GlobalsModRef.cpp
parentdb873d7452584205dd063528dc8addbf28aa396b (diff)
parentff2ba393a56d9d99dcb76ceada542233db28af9a (diff)
downloadFreeBSD-src-e06c171d67ab436f270b15f7e364a8d8f77c01f2.zip
FreeBSD-src-e06c171d67ab436f270b15f7e364a8d8f77c01f2.tar.gz
Update llvm to trunk r256945.
Diffstat (limited to 'contrib/llvm/lib/Analysis/GlobalsModRef.cpp')
-rw-r--r--contrib/llvm/lib/Analysis/GlobalsModRef.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/contrib/llvm/lib/Analysis/GlobalsModRef.cpp b/contrib/llvm/lib/Analysis/GlobalsModRef.cpp
index ab2263a..249f395 100644
--- a/contrib/llvm/lib/Analysis/GlobalsModRef.cpp
+++ b/contrib/llvm/lib/Analysis/GlobalsModRef.cpp
@@ -376,15 +376,6 @@ bool GlobalsAAResult::AnalyzeUsesOfPointer(Value *V,
} else {
return true; // Argument of an unknown call.
}
- // If the Callee is not ReadNone, it may read the global,
- // and if it is not ReadOnly, it may also write to it.
- Function *CalleeF = CS.getCalledFunction();
- if (!CalleeF->doesNotAccessMemory()) {
- if (Readers)
- Readers->insert(CalleeF);
- if (Writers && !CalleeF->onlyReadsMemory())
- Writers->insert(CalleeF);
- }
}
} else if (ICmpInst *ICI = dyn_cast<ICmpInst>(I)) {
if (!isa<ConstantPointerNull>(ICI->getOperand(1)))
@@ -516,7 +507,7 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, Module &M) {
if (F->isDeclaration()) {
// Try to get mod/ref behaviour from function attributes.
- if (F->doesNotAccessMemory() || F->onlyAccessesInaccessibleMemory()) {
+ if (F->doesNotAccessMemory()) {
// Can't do better than that!
} else if (F->onlyReadsMemory()) {
FI.addModRefInfo(MRI_Ref);
@@ -524,12 +515,6 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, Module &M) {
// This function might call back into the module and read a global -
// consider every global as possibly being read by this function.
FI.setMayReadAnyGlobal();
- } else if (F->onlyAccessesArgMemory() ||
- F->onlyAccessesInaccessibleMemOrArgMem()) {
- // This function may only access (read/write) memory pointed to by its
- // arguments. If this pointer is to a global, this escaping use of the
- // pointer is captured in AnalyzeUsesOfPointer().
- FI.addModRefInfo(MRI_ModRef);
} else {
FI.addModRefInfo(MRI_ModRef);
// Can't say anything useful unless it's an intrinsic - they don't
OpenPOWER on IntegriCloud