//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
using namespace llvm;
// Register the AliasAnalysis interface, providing a nice name to refer to.
-namespace {
- RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis");
-}
+static RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis");
char AliasAnalysis::ID = 0;
//===----------------------------------------------------------------------===//
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;
}
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;
}
//
AliasAnalysis::~AliasAnalysis() {}
-/// setTargetData - Subclasses must call this method to initialize the
+/// InitializeAliasAnalysis - Subclasses must call this method to initialize the
/// AliasAnalysis interface before any other methods are called.
///
void AliasAnalysis::InitializeAliasAnalysis(Pass *P) {