summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-12-12 16:01:40 +0000
committerDuncan Sands <baldrick@free.fr>2007-12-12 16:01:40 +0000
commit9ab0943b8687b220252b88d84b2b14218421eb3c (patch)
treec02ab38d6881b41acd2cc293ff1b7795c053e0e6 /llvm/lib/Analysis
parent309e5a723b26f1a59c25bb1c629e6c7b0216eaa5 (diff)
downloadbcm5719-llvm-9ab0943b8687b220252b88d84b2b14218421eb3c.tar.gz
bcm5719-llvm-9ab0943b8687b220252b88d84b2b14218421eb3c.zip
Revert r44626, which turned off the use of readonly
and readnone for functions with bodies because it broke llvm-gcc-4.2 bootstrap. It turns out that, because of LLVM's array_ref hack, gcc was computing pure/const attributes wrong (now fixed by turning off the gcc ipa-pure-const pass). llvm-svn: 44937
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/AliasAnalysis.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index fe3f41a9ce8..12ea937fa92 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -116,17 +116,13 @@ AliasAnalysis::getModRefInfo(StoreInst *S, Value *P, unsigned Size) {
AliasAnalysis::ModRefBehavior
AliasAnalysis::getModRefBehavior(CallSite CS,
std::vector<PointerAccessInfo> *Info) {
- if (CS.doesNotAccessMemory() &&
- // FIXME: workaround gcc bootstrap breakage
- CS.getCalledFunction() && CS.getCalledFunction()->isDeclaration())
+ if (CS.doesNotAccessMemory())
// Can't do better than this.
return DoesNotAccessMemory;
ModRefBehavior MRB = UnknownModRefBehavior;
if (Function *F = CS.getCalledFunction())
MRB = getModRefBehavior(F, CS, Info);
- if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory() &&
- // FIXME: workaround gcc bootstrap breakage
- CS.getCalledFunction() && CS.getCalledFunction()->isDeclaration())
+ if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory())
return OnlyReadsMemory;
return MRB;
}
@@ -134,15 +130,11 @@ AliasAnalysis::getModRefBehavior(CallSite CS,
AliasAnalysis::ModRefBehavior
AliasAnalysis::getModRefBehavior(Function *F,
std::vector<PointerAccessInfo> *Info) {
- if (F->doesNotAccessMemory() &&
- // FIXME: workaround gcc bootstrap breakage
- F->isDeclaration())
+ if (F->doesNotAccessMemory())
// Can't do better than this.
return DoesNotAccessMemory;
ModRefBehavior MRB = getModRefBehavior(F, CallSite(), Info);
- if (MRB != DoesNotAccessMemory && F->onlyReadsMemory() &&
- // FIXME: workaround gcc bootstrap breakage
- F->isDeclaration())
+ if (MRB != DoesNotAccessMemory && F->onlyReadsMemory())
return OnlyReadsMemory;
return MRB;
}
OpenPOWER on IntegriCloud