mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[PM] Introduce CRTP mixin base classes to help define passes and
analyses in the new pass manager. These just handle really basic stuff: turning a type name into a string statically that is nice to print in logs, and getting a static unique ID for each analysis. Sadly, the format of passes in anonymous namespaces makes using their names in tests really annoying so I've customized the names of the no-op passes to keep tests sane to read. This is the first of a few simplifying refactorings for the new pass manager that should reduce boilerplate and confusion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262004 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -13,8 +13,6 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
char CGSCCAnalysisManagerModuleProxy::PassID;
|
||||
|
||||
CGSCCAnalysisManagerModuleProxy::Result
|
||||
CGSCCAnalysisManagerModuleProxy::run(Module &M) {
|
||||
assert(CGAM->empty() && "CGSCC analyses ran prior to the module proxy!");
|
||||
@@ -44,10 +42,6 @@ bool CGSCCAnalysisManagerModuleProxy::Result::invalidate(
|
||||
return false;
|
||||
}
|
||||
|
||||
char ModuleAnalysisManagerCGSCCProxy::PassID;
|
||||
|
||||
char FunctionAnalysisManagerCGSCCProxy::PassID;
|
||||
|
||||
FunctionAnalysisManagerCGSCCProxy::Result
|
||||
FunctionAnalysisManagerCGSCCProxy::run(LazyCallGraph::SCC &C) {
|
||||
return Result(*FAM);
|
||||
@@ -75,5 +69,3 @@ bool FunctionAnalysisManagerCGSCCProxy::Result::invalidate(
|
||||
// Return false to indicate that this result is still a valid proxy.
|
||||
return false;
|
||||
}
|
||||
|
||||
char CGSCCAnalysisManagerFunctionProxy::PassID;
|
||||
|
||||
Reference in New Issue
Block a user