[PM] Introduce CRTP mixin base classes to help define passes and
authorChandler Carruth <chandlerc@gmail.com>
Fri, 26 Feb 2016 11:44:45 +0000 (11:44 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 26 Feb 2016 11:44:45 +0000 (11:44 +0000)
commit3a6343555180817fe1f533a60e66b0e4db465e46
treeb5c40db2a6e046ae4d71a83a06a4f591233ba90f
parent6456376fe94dcf4df5f2b946c1806fe579f9e414
[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.

llvm-svn: 262004
59 files changed:
llvm/include/llvm/Analysis/AliasAnalysis.h
llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h
llvm/include/llvm/Analysis/AssumptionCache.h
llvm/include/llvm/Analysis/BasicAliasAnalysis.h
llvm/include/llvm/Analysis/CFLAliasAnalysis.h
llvm/include/llvm/Analysis/CGSCCPassManager.h
llvm/include/llvm/Analysis/CallGraph.h
llvm/include/llvm/Analysis/DominanceFrontier.h
llvm/include/llvm/Analysis/GlobalsModRef.h
llvm/include/llvm/Analysis/LazyCallGraph.h
llvm/include/llvm/Analysis/LoopInfo.h
llvm/include/llvm/Analysis/LoopPassManager.h
llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h
llvm/include/llvm/Analysis/PostDominators.h
llvm/include/llvm/Analysis/RegionInfo.h
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h
llvm/include/llvm/Analysis/ScopedNoAliasAA.h
llvm/include/llvm/Analysis/TargetLibraryInfo.h
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
llvm/include/llvm/IR/Dominators.h
llvm/include/llvm/IR/PassManager.h
llvm/include/llvm/IR/Verifier.h
llvm/include/llvm/Transforms/IPO/ForceFunctionAttrs.h
llvm/include/llvm/Transforms/IPO/FunctionAttrs.h
llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h
llvm/include/llvm/Transforms/IPO/StripDeadPrototypes.h
llvm/include/llvm/Transforms/InstCombine/InstCombine.h
llvm/include/llvm/Transforms/Scalar/ADCE.h
llvm/include/llvm/Transforms/Scalar/EarlyCSE.h
llvm/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h
llvm/include/llvm/Transforms/Scalar/SROA.h
llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
llvm/lib/Analysis/AliasAnalysis.cpp
llvm/lib/Analysis/AssumptionCache.cpp
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/lib/Analysis/CFLAliasAnalysis.cpp
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/lib/Analysis/CallGraph.cpp
llvm/lib/Analysis/DominanceFrontier.cpp
llvm/lib/Analysis/GlobalsModRef.cpp
llvm/lib/Analysis/LazyCallGraph.cpp
llvm/lib/Analysis/LoopInfo.cpp
llvm/lib/Analysis/LoopPassManager.cpp
llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp
llvm/lib/Analysis/PostDominators.cpp
llvm/lib/Analysis/RegionInfo.cpp
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
llvm/lib/Analysis/ScopedNoAliasAA.cpp
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
llvm/lib/IR/Dominators.cpp
llvm/lib/IR/PassManager.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/test/Other/new-pass-manager.ll
llvm/unittests/IR/PassManagerTest.cpp