/// case the most generic behavior of this function should be returned.
virtual ModRefBehavior getModRefBehavior(Function *F, CallSite CS,
std::vector<PointerAccessInfo> *Info) {
- if (FunctionRecord *FR = getFunctionInfo(F))
+ if (FunctionRecord *FR = getFunctionInfo(F)) {
if (FR->FunctionEffect == 0)
return DoesNotAccessMemory;
else if ((FR->FunctionEffect & Mod) == 0)
return OnlyReadsMemory;
+ }
return AliasAnalysis::getModRefBehavior(F, CS, Info);
}
GlobalValue *OkayStoreDest = 0);
bool AnalyzeIndirectGlobalMemory(GlobalValue *GV);
};
-
- char GlobalsModRef::ID = 0;
- RegisterPass<GlobalsModRef> X("globalsmodref-aa",
- "Simple mod/ref analysis for globals");
- RegisterAnalysisGroup<AliasAnalysis> Y(X);
}
+char GlobalsModRef::ID = 0;
+static RegisterPass<GlobalsModRef>
+X("globalsmodref-aa", "Simple mod/ref analysis for globals", false, true);
+static RegisterAnalysisGroup<AliasAnalysis> Y(X);
+
Pass *llvm::createGlobalsModRefPass() { return new GlobalsModRef(); }
/// getUnderlyingObject - This traverses the use chain to figure out what object