diff options
-rw-r--r-- | lib/Analysis/AliasAnalysis.cpp | 16 | ||||
-rw-r--r-- | lib/VMCore/Instruction.cpp | 3 |
2 files changed, 4 insertions, 15 deletions
diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp index fe3f41a9ce..12ea937fa9 100644 --- a/lib/Analysis/AliasAnalysis.cpp +++ b/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; } diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 7fc6245f6d..9b208854ba 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -13,7 +13,6 @@ #include "llvm/Type.h" #include "llvm/Instructions.h" -#include "llvm/IntrinsicInst.h" // FIXME: remove #include "llvm/Function.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/LeakDetector.h" @@ -209,8 +208,6 @@ bool Instruction::mayWriteToMemory() const { case Instruction::VAArg: return true; case Instruction::Call: - if (!isa<IntrinsicInst>(this)) - return true; // FIXME: workaround gcc bootstrap breakage return !cast<CallInst>(this)->onlyReadsMemory(); case Instruction::Load: return cast<LoadInst>(this)->isVolatile(); |