char AnalysisBase::ID should be declared as extern and defined in one module.
llvm-svn: 262185
}
};
+extern template class AnalysisBase<AAManager>;
+
/// A wrapper pass to provide the legacy pass manager access to a suitably
/// prepared AAResults object.
class AAResultsWrapperPass : public FunctionPass {
AssumptionCache run(Function &F) { return AssumptionCache(F); }
};
+extern template class AnalysisBase<AssumptionAnalysis>;
+
/// \brief Printer pass for the \c AssumptionAnalysis results.
class AssumptionPrinterPass : public PassBase<AssumptionPrinterPass> {
raw_ostream &OS;
typedef InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>
CGSCCAnalysisManagerModuleProxy;
+extern template class AnalysisBase<CGSCCAnalysisManagerModuleProxy>;
+
extern template class OuterAnalysisManagerProxy<ModuleAnalysisManager,
LazyCallGraph::SCC>;
/// A proxy from a \c ModuleAnalysisManager to an \c SCC.
typedef OuterAnalysisManagerProxy<ModuleAnalysisManager, LazyCallGraph::SCC>
ModuleAnalysisManagerCGSCCProxy;
+extern template class AnalysisBase<ModuleAnalysisManagerCGSCCProxy>;
+
/// \brief The core module pass which does a post-order walk of the SCCs and
/// runs a CGSCC pass over each one.
///
typedef InnerAnalysisManagerProxy<FunctionAnalysisManager, LazyCallGraph::SCC>
FunctionAnalysisManagerCGSCCProxy;
+extern template class AnalysisBase<FunctionAnalysisManagerCGSCCProxy>;
+
extern template class OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>;
/// A proxy from a \c CGSCCAnalysisManager to a \c Function.
typedef OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>
DominanceFrontier run(Function &F, AnalysisManager<Function> *AM);
};
+extern template class AnalysisBase<DominanceFrontierAnalysis>;
+
/// \brief Printer pass for the \c DominanceFrontier.
class DominanceFrontierPrinterPass
: public PassBase<DominanceFrontierPrinterPass> {
LazyCallGraph run(Module &M) { return LazyCallGraph(M); }
};
+extern template class AnalysisBase<LazyCallGraphAnalysis>;
+
/// A pass which prints the call graph to a \c raw_ostream.
///
/// This is primarily useful for testing the analysis.
LoopInfo run(Function &F, AnalysisManager<Function> *AM);
};
+extern template class AnalysisBase<LoopAnalysis>;
+
/// \brief Printer pass for the \c LoopAnalysis results.
class LoopPrinterPass : public PassBase<LoopPrinterPass> {
raw_ostream &OS;
typedef InnerAnalysisManagerProxy<LoopAnalysisManager, Function>
LoopAnalysisManagerFunctionProxy;
+extern template class AnalysisBase<LoopAnalysisManagerFunctionProxy>;
+
extern template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>;
/// A proxy from a \c FunctionAnalysisManager to a \c Loop.
typedef OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>
PostDominatorTree run(Function &F);
};
+extern template class AnalysisBase<PostDominatorTreeAnalysis>;
+
/// \brief Printer pass for the \c PostDominatorTree.
class PostDominatorTreePrinterPass
: public PassBase<PostDominatorTreePrinterPass> {
RegionInfo run(Function &F, AnalysisManager<Function> *AM);
};
+extern template class AnalysisBase<RegionInfoAnalysis>;
+
/// \brief Printer pass for the \c RegionInfo.
class RegionInfoPrinterPass : public PassBase<RegionInfoPrinterPass> {
raw_ostream &OS;
ScalarEvolution run(Function &F, AnalysisManager<Function> *AM);
};
+ extern template class AnalysisBase<ScalarEvolutionAnalysis>;
+
/// \brief Printer pass for the \c ScalarEvolutionAnalysis results.
class ScalarEvolutionPrinterPass
: public PassBase<ScalarEvolutionPrinterPass> {
TargetLibraryInfoImpl &lookupInfoImpl(Triple T);
};
+extern template class AnalysisBase<TargetLibraryAnalysis>;
+
class TargetLibraryInfoWrapperPass : public ImmutablePass {
TargetLibraryInfoImpl TLIImpl;
TargetLibraryInfo TLI;
static Result getDefaultTTI(const Function &F);
};
+extern template class AnalysisBase<TargetIRAnalysis>;
+
/// \brief Wrapper pass for TargetTransformInfo.
///
/// This pass can be constructed from a TTI object which it stores internally
DominatorTree run(Function &F);
};
+extern template class AnalysisBase<DominatorTreeAnalysis>;
+
/// \brief Printer pass for the \c DominatorTree.
class DominatorTreePrinterPass : public PassBase<DominatorTreePrinterPass> {
raw_ostream &OS;
typedef InnerAnalysisManagerProxy<FunctionAnalysisManager, Module>
FunctionAnalysisManagerModuleProxy;
+extern template class AnalysisBase<FunctionAnalysisManagerModuleProxy>;
+
/// \brief A function analysis which acts as a proxy for a module analysis
/// manager.
///
// Provide a definition for the root virtual destructor.
AAResults::Concept::~Concept() {}
+// Provide a definition for the static object used to identify passes.
+template class AnalysisBase<AAManager>;
+
namespace {
/// A wrapper pass for external alias analyses. This just squirrels away the
/// callback used to run any analyses and register their results.
#endif
}
+template class AnalysisBase<AssumptionAnalysis>;
+
PreservedAnalyses AssumptionPrinterPass::run(Function &F,
AnalysisManager<Function> *AM) {
AssumptionCache &AC = AM->getResult<AssumptionAnalysis>(F);
template class PassManager<LazyCallGraph::SCC>;
template class AnalysisManager<LazyCallGraph::SCC>;
template class InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>;
+template class AnalysisBase<CGSCCAnalysisManagerModuleProxy>;
template class OuterAnalysisManagerProxy<ModuleAnalysisManager,
LazyCallGraph::SCC>;
+template class AnalysisBase<ModuleAnalysisManagerCGSCCProxy>;
template class InnerAnalysisManagerProxy<FunctionAnalysisManager,
LazyCallGraph::SCC>;
+template class AnalysisBase<FunctionAnalysisManagerCGSCCProxy>;
template class OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>;
}
}
#endif
+template class AnalysisBase<DominanceFrontierAnalysis>;
+
DominanceFrontier DominanceFrontierAnalysis::run(Function &F,
FunctionAnalysisManager *AM) {
DominanceFrontier DF;
}
}
+template class AnalysisBase<LazyCallGraphAnalysis>;
+
LazyCallGraphPrinterPass::LazyCallGraphPrinterPass(raw_ostream &OS) : OS(OS) {}
static void printNode(raw_ostream &OS, LazyCallGraph::Node &N) {
}
}
+template class AnalysisBase<LoopAnalysis>;
+
LoopInfo LoopAnalysis::run(Function &F, AnalysisManager<Function> *AM) {
// FIXME: Currently we create a LoopInfo from scratch for every function.
// This may prove to be too wasteful due to deallocating and re-allocating
template class PassManager<Loop>;
template class AnalysisManager<Loop>;
template class InnerAnalysisManagerProxy<LoopAnalysisManager, Function>;
+template class AnalysisBase<LoopAnalysisManagerFunctionProxy>;
template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>;
}
return new PostDominatorTreeWrapperPass();
}
+template class AnalysisBase<PostDominatorTreeAnalysis>;
+
PostDominatorTree PostDominatorTreeAnalysis::run(Function &F) {
PostDominatorTree PDT;
PDT.recalculate(F);
// RegionInfoAnalysis implementation
//
+template class AnalysisBase<RegionInfoAnalysis>;
+
RegionInfo RegionInfoAnalysis::run(Function &F, AnalysisManager<Function> *AM) {
RegionInfo RI;
auto *DT = &AM->getResult<DominatorTreeAnalysis>(F);
// TODO: Verify more things.
}
+template class AnalysisBase<ScalarEvolutionAnalysis>;
+
ScalarEvolution ScalarEvolutionAnalysis::run(Function &F,
AnalysisManager<Function> *AM) {
return ScalarEvolution(F, AM->getResult<TargetLibraryAnalysis>(F),
initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry());
}
+template class AnalysisBase<TargetLibraryAnalysis>;
+
// Register the basic pass.
INITIALIZE_PASS(TargetLibraryInfoWrapperPass, "targetlibinfo",
"Target Library Information", false, true)
return TTICallback(F);
}
+template class AnalysisBase<TargetIRAnalysis>;
+
TargetIRAnalysis::Result TargetIRAnalysis::getDefaultTTI(const Function &F) {
return Result(F.getParent()->getDataLayout());
}
return DT;
}
+template class AnalysisBase<DominatorTreeAnalysis>;
+
DominatorTreePrinterPass::DominatorTreePrinterPass(raw_ostream &OS) : OS(OS) {}
PreservedAnalyses DominatorTreePrinterPass::run(Function &F,
template class AnalysisManager<Module>;
template class AnalysisManager<Function>;
template class InnerAnalysisManagerProxy<FunctionAnalysisManager, Module>;
+template class AnalysisBase<FunctionAnalysisManagerModuleProxy>;
template class OuterAnalysisManagerProxy<ModuleAnalysisManager, Function>;
}