37#ifndef LLVM_IR_PASSMANAGER_H
38#define LLVM_IR_PASSMANAGER_H
98template <
typename IRUnitT> AnalysisSetKey AllAnalysesOn<IRUnitT>::SetKey;
100extern template class AllAnalysesOn<Module>;
101extern template class AllAnalysesOn<Function>;
160 PA.PreservedIDs.
insert(&AllAnalysesKey);
165 template <
typename AnalysisSetT>
179 NotPreservedAnalysisIDs.erase(
ID);
183 if (!areAllPreserved())
184 PreservedIDs.insert(
ID);
189 preserveSet(AnalysisSetT::ID());
195 if (!areAllPreserved())
196 PreservedIDs.insert(
ID);
216 PreservedIDs.erase(
ID);
217 NotPreservedAnalysisIDs.insert(
ID);
225 if (
Arg.areAllPreserved())
227 if (areAllPreserved()) {
233 for (
auto *
ID :
Arg.NotPreservedAnalysisIDs) {
234 PreservedIDs.erase(
ID);
235 NotPreservedAnalysisIDs.insert(
ID);
237 for (
auto *
ID : PreservedIDs)
238 if (!
Arg.PreservedIDs.count(
ID))
239 PreservedIDs.erase(
ID);
247 if (
Arg.areAllPreserved())
249 if (areAllPreserved()) {
250 *
this = std::move(
Arg);
255 for (
auto *
ID :
Arg.NotPreservedAnalysisIDs) {
256 PreservedIDs.erase(
ID);
257 NotPreservedAnalysisIDs.insert(
ID);
259 for (
auto *
ID : PreservedIDs)
260 if (!
Arg.PreservedIDs.count(
ID))
261 PreservedIDs.erase(
ID);
271 const bool IsAbandoned;
277 : PA(PA),
ID(
ID), IsAbandoned(PA.NotPreservedAnalysisIDs.
count(
ID)) {}
284 return !IsAbandoned && (PA.PreservedIDs.
count(&AllAnalysesKey) ||
300 return !IsAbandoned && (PA.PreservedIDs.
count(&AllAnalysesKey) ||
301 PA.PreservedIDs.
count(SetID));
328 return NotPreservedAnalysisIDs.empty() &&
329 PreservedIDs.count(&AllAnalysesKey);
336 return allAnalysesInSetPreserved(AnalysisSetT::ID());
343 return NotPreservedAnalysisIDs.empty() &&
344 (PreservedIDs.count(&AllAnalysesKey) || PreservedIDs.count(SetID));
365template <
typename IRUnitT,
typename... ExtraArgTs>
class AnalysisManager;
374 static_assert(std::is_base_of<PassInfoMixin, DerivedT>::value,
375 "Must pass the derived type as the template argument!");
377 Name.consume_front(
"llvm::");
384 auto PassName = MapClassName2PassName(ClassName);
393template <
typename DerivedT>
411 static_assert(std::is_base_of<AnalysisInfoMixin, DerivedT>::value,
412 "Must pass the derived type as the template argument!");
413 return &DerivedT::Key;
421template <
typename PassT,
typename IRUnitT,
typename AnalysisManagerT,
422 typename... ArgTs,
size_t... Ns>
423typename PassT::Result
425 std::tuple<ArgTs...> Args,
426 std::index_sequence<Ns...>) {
428 return AM.template getResult<PassT>(
IR, std::get<Ns>(Args)...);
436template <
typename PassT,
typename IRUnitT,
typename... AnalysisArgTs,
437 typename... MainArgTs>
438typename PassT::Result
440 std::tuple<MainArgTs...> Args) {
442 PassT, IRUnitT>)(AM,
IR, Args,
443 std::index_sequence_for<AnalysisArgTs...>{});
452class PassInstrumentationAnalysis;
466template <
typename IRUnitT,
467 typename AnalysisManagerT = AnalysisManager<IRUnitT>,
468 typename... ExtraArgTs>
470 PassManager<IRUnitT, AnalysisManagerT, ExtraArgTs...>> {
490 P->printPipeline(
OS, MapClassName2PassName);
499 ExtraArgTs... ExtraArgs) {
507 detail::getAnalysisResult<PassInstrumentationAnalysis>(
508 AM,
IR, std::tuple<ExtraArgTs...>(ExtraArgs...));
521 AM.invalidate(
IR, PassPA);
541 template <
typename PassT>
543 std::enable_if_t<!std::is_same<PassT, PassManager>::value>
550 Passes.push_back(std::unique_ptr<PassConceptT>(
551 new PassModelT(std::forward<PassT>(
Pass))));
559 template <
typename PassT>
561 std::enable_if_t<std::is_same<PassT, PassManager>::value>
563 for (
auto &
P :
Pass.Passes)
564 Passes.push_back(std::move(
P));
576 std::vector<std::unique_ptr<PassConceptT>>
Passes;
605 : Callbacks(Callbacks) {}
609 template <
typename IRUnitT,
typename AnalysisManagerT,
typename... ExtraArgTs>
610 Result run(IRUnitT &, AnalysisManagerT &, ExtraArgTs &&...) {
638 using AnalysisResultListT =
639 std::list<std::pair<AnalysisKey *, std::unique_ptr<ResultConceptT>>>;
649 typename AnalysisResultListT::iterator>;
678 template <
typename PassT>
684 return invalidateImpl<ResultModelT>(PassT::ID(),
IR, PA);
694 return invalidateImpl<>(
ID,
IR, PA);
700 template <
typename ResultT = ResultConceptT>
705 auto IMapI = IsResultInvalidated.find(
ID);
706 if (IMapI != IsResultInvalidated.end())
707 return IMapI->second;
712 "Trying to invalidate a dependent result that isn't in the "
713 "manager's cache is always an error, likely due to a stale result "
716 auto &Result =
static_cast<ResultT &
>(*RI->second->second);
723 std::tie(IMapI, Inserted) =
724 IsResultInvalidated.insert({
ID, Result.invalidate(
IR, PA, *
this)});
726 assert(Inserted &&
"Should not have already inserted this ID, likely "
727 "indicates a dependency cycle!");
728 return IMapI->second;
731 Invalidator(SmallDenseMap<AnalysisKey *, bool, 8> &IsResultInvalidated,
732 const AnalysisResultMapT &
Results)
735 SmallDenseMap<AnalysisKey *, bool, 8> &IsResultInvalidated;
736 const AnalysisResultMapT &
Results;
747 "The storage and index of analysis results disagree on how many "
749 return AnalysisResults.
empty();
766 AnalysisResults.
clear();
767 AnalysisResultLists.
clear();
773 template <
typename PassT>
774 typename PassT::Result &
getResult(IRUnitT &
IR, ExtraArgTs... ExtraArgs) {
776 "This analysis pass was not registered prior to being queried");
778 getResultImpl(PassT::ID(),
IR, ExtraArgs...);
784 return static_cast<ResultModelT &
>(ResultConcept).Result;
792 template <
typename PassT>
795 "This analysis pass was not registered prior to being queried");
805 return &
static_cast<ResultModelT *
>(ResultConcept)->Result;
809 template <
typename PassT>
813 Invalidator Inv(IsResultInvalidated, AnalysisResults);
814 assert(!Result->invalidate(
IR, PA, Inv) &&
815 "Cached result cannot be invalidated");
835 template <
typename PassBuilderT>
842 auto &PassPtr = AnalysisPasses[PassT::ID()];
863 "Analysis passes must be registered prior to being queried!");
868 const PassConceptT &lookUpPass(AnalysisKey *
ID)
const {
871 "Analysis passes must be registered prior to being queried!");
876 ResultConceptT &getResultImpl(AnalysisKey *
ID, IRUnitT &
IR,
877 ExtraArgTs... ExtraArgs);
880 ResultConceptT *getCachedResultImpl(AnalysisKey *
ID, IRUnitT &
IR)
const {
883 return RI == AnalysisResults.
end() ? nullptr : &*RI->second->second;
887 using AnalysisPassMapT =
888 DenseMap<AnalysisKey *, std::unique_ptr<PassConceptT>>;
891 AnalysisPassMapT AnalysisPasses;
897 AnalysisResultListMapT AnalysisResultLists;
901 AnalysisResultMapT AnalysisResults;
904extern template class AnalysisManager<Module>;
930template <
typename AnalysisManagerT,
typename IRUnitT,
typename... ExtraArgTs>
933 InnerAnalysisManagerProxy<AnalysisManagerT, IRUnitT>> {
937 explicit Result(AnalysisManagerT &InnerAM) : InnerAM(&InnerAM) {}
943 Arg.InnerAM =
nullptr;
957 InnerAM =
RHS.InnerAM;
961 RHS.InnerAM =
nullptr;
983 AnalysisManagerT *InnerAM;
987 : InnerAM(&InnerAM) {}
1005 AnalysisManagerT *InnerAM;
1008template <
typename AnalysisManagerT,
typename IRUnitT,
typename... ExtraArgTs>
1010 InnerAnalysisManagerProxy<AnalysisManagerT, IRUnitT, ExtraArgTs...>::Key;
1019bool FunctionAnalysisManagerModuleProxy::Result::invalidate(
1055template <
typename AnalysisManagerT,
typename IRUnitT,
typename... ExtraArgTs>
1058 OuterAnalysisManagerProxy<AnalysisManagerT, IRUnitT, ExtraArgTs...>> {
1063 explicit Result(
const AnalysisManagerT &OuterAM) : OuterAM(&OuterAM) {}
1067 template <
typename PassT,
typename IRUnitTParam>
1069 typename PassT::Result *Res =
1070 OuterAM->template getCachedResult<PassT>(
IR);
1072 OuterAM->template verifyNotInvalidated<PassT>(
IR, Res);
1077 template <
typename PassT,
typename IRUnitTParam>
1079 typename PassT::Result *Res =
1080 OuterAM->template getCachedResult<PassT>(
IR);
1081 return Res !=
nullptr;
1091 for (
auto &KeyValuePair : OuterAnalysisInvalidationMap) {
1093 auto &InnerIDs = KeyValuePair.second;
1097 if (InnerIDs.empty())
1101 for (
auto *OuterID : DeadKeys)
1102 OuterAnalysisInvalidationMap.erase(OuterID);
1110 template <
typename OuterAnalysisT,
typename Inval
idatedAnalysisT>
1113 AnalysisKey *InvalidatedID = InvalidatedAnalysisT::ID();
1115 auto &InvalidatedIDList = OuterAnalysisInvalidationMap[OuterID];
1121 InvalidatedIDList.push_back(InvalidatedID);
1128 return OuterAnalysisInvalidationMap;
1132 const AnalysisManagerT *OuterAM;
1137 OuterAnalysisInvalidationMap;
1141 : OuterAM(&OuterAM) {}
1157 const AnalysisManagerT *OuterAM;
1160template <
typename AnalysisManagerT,
typename IRUnitT,
typename... ExtraArgTs>
1162 OuterAnalysisManagerProxy<AnalysisManagerT, IRUnitT, ExtraArgTs...>::Key;
1199 bool EagerlyInvalidate)
1210 std::unique_ptr<PassConceptT>
Pass;
1211 bool EagerlyInvalidate;
1216template <
typename FunctionPassT>
1217ModuleToFunctionPassAdaptor
1219 bool EagerlyInvalidate =
false) {
1226 std::unique_ptr<ModuleToFunctionPassAdaptor::PassConceptT>(
1227 new PassModelT(std::forward<FunctionPassT>(
Pass))),
1240template <
typename AnalysisT,
typename IRUnitT,
1241 typename AnalysisManagerT = AnalysisManager<IRUnitT>,
1242 typename... ExtraArgTs>
1244 :
PassInfoMixin<RequireAnalysisPass<AnalysisT, IRUnitT, AnalysisManagerT,
1253 ExtraArgTs &&... Args) {
1254 (void)AM.template getResult<AnalysisT>(
Arg,
1255 std::forward<ExtraArgTs>(Args)...);
1261 auto ClassName = AnalysisT::name();
1262 auto PassName = MapClassName2PassName(ClassName);
1270template <
typename AnalysisT>
1279 template <
typename IRUnitT,
typename AnalysisManagerT,
typename... ExtraArgTs>
1287 auto ClassName = AnalysisT::name();
1288 auto PassName = MapClassName2PassName(ClassName);
1299 template <
typename IRUnitT,
typename AnalysisManagerT,
typename... ExtraArgTs>
1309template <
typename PassT>
1313 : Count(Count), P(
std::forward<PassT>(P)) {}
1315 template <
typename IRUnitT,
typename AnalysisManagerT,
typename... Ts>
1323 detail::getAnalysisResult<PassInstrumentationAnalysis>(
1324 AM,
IR, std::tuple<Ts...>(Args...));
1327 for (
int i = 0; i < Count; ++i) {
1342 OS <<
"repeat<" << Count <<
">(";
1343 P.printPipeline(
OS, MapClassName2PassName);
1352template <
typename PassT>
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Function Alias Analysis Results
#define LLVM_ATTRIBUTE_MINSIZE
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file defines the DenseMap class.
Legalize the Machine IR a function s Machine IR
Module.h This file contains the declarations for the Module class.
This file defines the Pass Instrumentation classes that provide instrumentation points into the pass ...
This header provides internal APIs and implementation details used by the pass management interfaces ...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallPtrSet class.
static const char PassName[]
This templated class represents "all analyses that operate over <a particular IR unit>" (e....
static AnalysisSetKey * ID()
API to communicate dependencies between analyses during invalidation.
bool invalidate(AnalysisKey *ID, IRUnitT &IR, const PreservedAnalyses &PA)
A type-erased variant of the above invalidate method with the same core API other than passing an ana...
bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA)
Trigger the invalidation of some other analysis pass if not already handled and return whether it was...
A container for analyses that lazily runs them and caches their results.
AnalysisManager()
Construct an empty analysis manager.
void clear()
Clear all analysis results cached by this AnalysisManager.
AnalysisManager(AnalysisManager &&)
void verifyNotInvalidated(IRUnitT &IR, typename PassT::Result *Result) const
Verify that the given Result cannot be invalidated, assert otherwise.
AnalysisManager & operator=(AnalysisManager &&)
void invalidate(IRUnitT &IR, const PreservedAnalyses &PA)
Invalidate cached analyses for an IR unit.
PassT::Result * getCachedResult(IRUnitT &IR) const
Get the cached result of an analysis pass for a given IR unit.
bool registerPass(PassBuilderT &&PassBuilder)
Register an analysis pass with the manager.
bool empty() const
Returns true if the analysis manager has an empty results cache.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represents analyses that only rely on functions' control flow.
static AnalysisSetKey * ID()
iterator find(const_arg_type_t< KeyT > Val)
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT > iterator
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA, typename AnalysisManager< IRUnitT, ExtraArgTs... >::Invalidator &Inv)
Handler for invalidation of the outer IR unit, IRUnitT.
Result(AnalysisManagerT &InnerAM)
Result & operator=(Result &&RHS)
AnalysisManagerT & getManager()
Accessor for the analysis manager.
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...
Result run(IRUnitT &IR, AnalysisManager< IRUnitT, ExtraArgTs... > &AM, ExtraArgTs...)
Run the analysis pass and create our proxy result object.
InnerAnalysisManagerProxy(AnalysisManagerT &InnerAM)
Trivial adaptor that maps from a module to its functions.
ModuleToFunctionPassAdaptor(std::unique_ptr< PassConceptT > Pass, bool EagerlyInvalidate)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Runs the function pass across every function in the module.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
A Module instance is used to store all the information related to an LLVM module.
Result proxy object for OuterAnalysisManagerProxy.
Result(const AnalysisManagerT &OuterAM)
PassT::Result * getCachedResult(IRUnitTParam &IR) const
Get a cached analysis.
bool invalidate(IRUnitT &IRUnit, const PreservedAnalyses &PA, typename AnalysisManager< IRUnitT, ExtraArgTs... >::Invalidator &Inv)
When invalidation occurs, remove any registered invalidation events.
bool cachedResultExists(IRUnitTParam &IR) const
Method provided for unit testing, not intended for general use.
const SmallDenseMap< AnalysisKey *, TinyPtrVector< AnalysisKey * >, 2 > & getOuterInvalidations() const
Access the map from outer analyses to deferred invalidation requiring analyses.
void registerOuterAnalysisInvalidation()
Register a deferred invalidation event for when the outer analysis manager processes its invalidation...
An analysis over an "inner" IR unit that provides access to an analysis manager over a "outer" IR uni...
Result run(IRUnitT &, AnalysisManager< IRUnitT, ExtraArgTs... > &, ExtraArgTs...)
Run the analysis pass and create our proxy result object.
OuterAnalysisManagerProxy(const AnalysisManagerT &OuterAM)
This class provides access to building LLVM's passes.
Pseudo-analysis pass that exposes the PassInstrumentation to pass managers.
Result run(IRUnitT &, AnalysisManagerT &, ExtraArgTs &&...)
PassInstrumentationAnalysis(PassInstrumentationCallbacks *Callbacks=nullptr)
PassInstrumentationCallbacks object is shared, owned by something else, not this analysis.
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks regis...
void runAfterPass(const PassT &Pass, const IRUnitT &IR, const PreservedAnalyses &PA) const
AfterPass instrumentation point - takes Pass instance that has just been executed and constant refere...
bool runBeforePass(const PassT &Pass, const IRUnitT &IR) const
BeforePass instrumentation point - takes Pass instance to be executed and constant reference to IR it...
Manages a sequence of passes over a particular unit of IR.
PassManager(PassManager &&Arg)
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
PassManager & operator=(PassManager &&RHS)
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t<!std::is_same< PassT, PassManager >::value > addPass(PassT &&Pass)
std::vector< std::unique_ptr< PassConceptT > > Passes
PassManager()=default
Construct a pass manager.
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t< std::is_same< PassT, PassManager >::value > addPass(PassT &&Pass)
When adding a pass manager pass that has the same type as this pass manager, simply move the passes o...
PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)
Run all of the passes in this manager over the given unit of IR.
bool isEmpty() const
Returns if the pass manager contains any passes.
Pass interface - Implemented by all 'passes'.
A checker object that makes it easy to query for whether an analysis or some set covering it is prese...
bool preserved()
Returns true if the checker's analysis was not abandoned and either.
bool preservedWhenStateless()
Return true if the checker's analysis was not abandoned, i.e.
bool preservedSet()
Returns true if the checker's analysis was not abandoned and either.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
void preserveSet(AnalysisSetKey *ID)
Mark an analysis set as preserved using its ID.
bool areAllPreserved() const
Test whether all analyses are preserved (and none are abandoned).
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
bool allAnalysesInSetPreserved() const
Directly test whether a set of analyses is preserved.
PreservedAnalysisChecker getChecker(AnalysisKey *ID) const
Build a checker for this PreservedAnalyses and the specified analysis ID.
void intersect(const PreservedAnalyses &Arg)
Intersect this set with another in place.
void intersect(PreservedAnalyses &&Arg)
Intersect this set with a temporary other set in place.
void abandon(AnalysisKey *ID)
Mark an analysis as abandoned using its ID.
bool allAnalysesInSetPreserved(AnalysisSetKey *SetID) const
Directly test whether a set of analyses is preserved.
void preserveSet()
Mark an analysis set as preserved.
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
void preserve(AnalysisKey *ID)
Given an analysis's ID, mark the analysis as preserved, adding it to the set.
void abandon()
Mark an analysis as abandoned.
void preserve()
Mark an analysis as preserved.
static PreservedAnalyses allInSet()
Construct a preserved analyses object with a single preserved set.
A utility pass template that simply runs another pass multiple times.
PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, Ts &&... Args)
RepeatedPass(int Count, PassT &&P)
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
PassT::Result getAnalysisResultUnpackTuple(AnalysisManagerT &AM, IRUnitT &IR, std::tuple< ArgTs... > Args, std::index_sequence< Ns... >)
Actual unpacker of extra arguments in getAnalysisResult, passes only those tuple arguments that are m...
PassT::Result getAnalysisResult(AnalysisManager< IRUnitT, AnalysisArgTs... > &AM, IRUnitT &IR, std::tuple< MainArgTs... > Args)
Helper for partial unpacking of extra arguments in getAnalysisResult.
This is an optimization pass for GlobalISel generic memory operations.
ModuleToFunctionPassAdaptor createModuleToFunctionPassAdaptor(FunctionPassT &&Pass, bool EagerlyInvalidate=false)
A function to deduce a function pass type and wrap it in the templated adaptor.
RepeatedPass< PassT > createRepeatedPass(int Count, PassT &&P)
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
void erase_if(Container &C, UnaryPredicate P)
Provide a container algorithm similar to C++ Library Fundamentals v2's erase_if which is equivalent t...
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
A CRTP mix-in that provides informational APIs needed for analysis passes.
static AnalysisKey * ID()
Returns an opaque, unique ID for this analysis type.
A special type used by analysis passes to provide an address that identifies that particular analysis...
A special type used to provide an address that identifies a set of related analyses.
A utility pass that does nothing, but preserves no analyses.
PreservedAnalyses run(IRUnitT &, AnalysisManagerT &, ExtraArgTs &&...)
Run this pass over some unit of IR.
A no-op pass template which simply forces a specific analysis result to be invalidated.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
PreservedAnalyses run(IRUnitT &Arg, AnalysisManagerT &AM, ExtraArgTs &&...)
Run this pass over some unit of IR.
A CRTP mix-in to automatically provide informational APIs needed for passes.
static StringRef name()
Gets the name of the pass we are mixed into.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
A utility pass template to force an analysis result to be available.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
PreservedAnalyses run(IRUnitT &Arg, AnalysisManagerT &AM, ExtraArgTs &&... Args)
Run this pass over some unit of IR.
Abstract concept of an analysis pass.
Wrapper to model the analysis pass concept.
Abstract concept of an analysis result.
Wrapper to model the analysis result concept.
A template wrapper used to implement the polymorphic API.