diff options
Diffstat (limited to 'include/llvm/IR/PassManager.h')
-rw-r--r-- | include/llvm/IR/PassManager.h | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index 4f838a719512..a5d4aaf71c0e 100644 --- a/include/llvm/IR/PassManager.h +++ b/include/llvm/IR/PassManager.h @@ -152,17 +152,17 @@ private: /// ``` class PreservedAnalyses { public: - /// \brief Convenience factory function for the empty preserved set. + /// Convenience factory function for the empty preserved set. static PreservedAnalyses none() { return PreservedAnalyses(); } - /// \brief Construct a special preserved set that preserves all passes. + /// Construct a special preserved set that preserves all passes. static PreservedAnalyses all() { PreservedAnalyses PA; PA.PreservedIDs.insert(&AllAnalysesKey); return PA; } - /// \brief Construct a preserved analyses object with a single preserved set. + /// Construct a preserved analyses object with a single preserved set. template <typename AnalysisSetT> static PreservedAnalyses allInSet() { PreservedAnalyses PA; @@ -173,7 +173,7 @@ public: /// Mark an analysis as preserved. template <typename AnalysisT> void preserve() { preserve(AnalysisT::ID()); } - /// \brief Given an analysis's ID, mark the analysis as preserved, adding it + /// Given an analysis's ID, mark the analysis as preserved, adding it /// to the set. void preserve(AnalysisKey *ID) { // Clear this ID from the explicit not-preserved set if present. @@ -218,7 +218,7 @@ public: NotPreservedAnalysisIDs.insert(ID); } - /// \brief Intersect this set with another in place. + /// Intersect this set with another in place. /// /// This is a mutating operation on this preserved set, removing all /// preserved passes which are not also preserved in the argument. @@ -240,7 +240,7 @@ public: PreservedIDs.erase(ID); } - /// \brief Intersect this set with a temporary other set in place. + /// Intersect this set with a temporary other set in place. /// /// This is a mutating operation on this preserved set, removing all /// preserved passes which are not also preserved in the argument. @@ -402,7 +402,7 @@ struct AnalysisInfoMixin : PassInfoMixin<DerivedT> { } }; -/// \brief Manages a sequence of passes over a particular unit of IR. +/// Manages a sequence of passes over a particular unit of IR. /// /// A pass manager contains a sequence of passes to run over a particular unit /// of IR (e.g. Functions, Modules). It is itself a valid pass over that unit of @@ -420,7 +420,7 @@ template <typename IRUnitT, class PassManager : public PassInfoMixin< PassManager<IRUnitT, AnalysisManagerT, ExtraArgTs...>> { public: - /// \brief Construct a pass manager. + /// Construct a pass manager. /// /// If \p DebugLogging is true, we'll log our progress to llvm::dbgs(). explicit PassManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} @@ -439,7 +439,7 @@ public: return *this; } - /// \brief Run all of the passes in this manager over the given unit of IR. + /// Run all of the passes in this manager over the given unit of IR. /// ExtraArgs are passed to each pass. PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs) { @@ -496,21 +496,21 @@ private: std::vector<std::unique_ptr<PassConceptT>> Passes; - /// \brief Flag indicating whether we should do debug logging. + /// Flag indicating whether we should do debug logging. bool DebugLogging; }; extern template class PassManager<Module>; -/// \brief Convenience typedef for a pass manager over modules. +/// Convenience typedef for a pass manager over modules. using ModulePassManager = PassManager<Module>; extern template class PassManager<Function>; -/// \brief Convenience typedef for a pass manager over functions. +/// Convenience typedef for a pass manager over functions. using FunctionPassManager = PassManager<Function>; -/// \brief A container for analyses that lazily runs them and caches their +/// A container for analyses that lazily runs them and caches their /// results. /// /// This class can manage analyses for any IR unit where the address of the IR @@ -527,7 +527,7 @@ private: detail::AnalysisPassConcept<IRUnitT, PreservedAnalyses, Invalidator, ExtraArgTs...>; - /// \brief List of analysis pass IDs and associated concept pointers. + /// List of analysis pass IDs and associated concept pointers. /// /// Requires iterators to be valid across appending new entries and arbitrary /// erases. Provides the analysis ID to enable finding iterators to a given @@ -536,10 +536,10 @@ private: using AnalysisResultListT = std::list<std::pair<AnalysisKey *, std::unique_ptr<ResultConceptT>>>; - /// \brief Map type from IRUnitT pointer to our custom list type. + /// Map type from IRUnitT pointer to our custom list type. using AnalysisResultListMapT = DenseMap<IRUnitT *, AnalysisResultListT>; - /// \brief Map type from a pair of analysis ID and IRUnitT pointer to an + /// Map type from a pair of analysis ID and IRUnitT pointer to an /// iterator into a particular result list (which is where the actual analysis /// result is stored). using AnalysisResultMapT = @@ -634,14 +634,14 @@ public: const AnalysisResultMapT &Results; }; - /// \brief Construct an empty analysis manager. + /// Construct an empty analysis manager. /// /// If \p DebugLogging is true, we'll log our progress to llvm::dbgs(). AnalysisManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} AnalysisManager(AnalysisManager &&) = default; AnalysisManager &operator=(AnalysisManager &&) = default; - /// \brief Returns true if the analysis manager has an empty results cache. + /// Returns true if the analysis manager has an empty results cache. bool empty() const { assert(AnalysisResults.empty() == AnalysisResultLists.empty() && "The storage and index of analysis results disagree on how many " @@ -649,7 +649,7 @@ public: return AnalysisResults.empty(); } - /// \brief Clear any cached analysis results for a single unit of IR. + /// Clear any cached analysis results for a single unit of IR. /// /// This doesn't invalidate, but instead simply deletes, the relevant results. /// It is useful when the IR is being removed and we want to clear out all the @@ -669,7 +669,7 @@ public: AnalysisResultLists.erase(ResultsListI); } - /// \brief Clear all analysis results cached by this AnalysisManager. + /// Clear all analysis results cached by this AnalysisManager. /// /// Like \c clear(IRUnitT&), this doesn't invalidate the results; it simply /// deletes them. This lets you clean up the AnalysisManager when the set of @@ -680,7 +680,7 @@ public: AnalysisResultLists.clear(); } - /// \brief Get the result of an analysis pass for a given IR unit. + /// Get the result of an analysis pass for a given IR unit. /// /// Runs the analysis if a cached result is not available. template <typename PassT> @@ -697,7 +697,7 @@ public: return static_cast<ResultModelT &>(ResultConcept).Result; } - /// \brief Get the cached result of an analysis pass for a given IR unit. + /// Get the cached result of an analysis pass for a given IR unit. /// /// This method never runs the analysis. /// @@ -718,7 +718,7 @@ public: return &static_cast<ResultModelT *>(ResultConcept)->Result; } - /// \brief Register an analysis pass with the manager. + /// Register an analysis pass with the manager. /// /// The parameter is a callable whose result is an analysis pass. This allows /// passing in a lambda to construct the analysis. @@ -752,7 +752,7 @@ public: return true; } - /// \brief Invalidate a specific analysis pass for an IR module. + /// Invalidate a specific analysis pass for an IR module. /// /// Note that the analysis result can disregard invalidation, if it determines /// it is in fact still valid. @@ -762,7 +762,7 @@ public: invalidateImpl(PassT::ID(), IR); } - /// \brief Invalidate cached analyses for an IR unit. + /// Invalidate cached analyses for an IR unit. /// /// Walk through all of the analyses pertaining to this unit of IR and /// invalidate them, unless they are preserved by the PreservedAnalyses set. @@ -829,7 +829,7 @@ public: } private: - /// \brief Look up a registered analysis pass. + /// Look up a registered analysis pass. PassConceptT &lookUpPass(AnalysisKey *ID) { typename AnalysisPassMapT::iterator PI = AnalysisPasses.find(ID); assert(PI != AnalysisPasses.end() && @@ -837,7 +837,7 @@ private: return *PI->second; } - /// \brief Look up a registered analysis pass. + /// Look up a registered analysis pass. const PassConceptT &lookUpPass(AnalysisKey *ID) const { typename AnalysisPassMapT::const_iterator PI = AnalysisPasses.find(ID); assert(PI != AnalysisPasses.end() && @@ -845,7 +845,7 @@ private: return *PI->second; } - /// \brief Get an analysis result, running the pass if necessary. + /// Get an analysis result, running the pass if necessary. ResultConceptT &getResultImpl(AnalysisKey *ID, IRUnitT &IR, ExtraArgTs... ExtraArgs) { typename AnalysisResultMapT::iterator RI; @@ -874,14 +874,14 @@ private: return *RI->second->second; } - /// \brief Get a cached analysis result or return null. + /// Get a cached analysis result or return null. ResultConceptT *getCachedResultImpl(AnalysisKey *ID, IRUnitT &IR) const { typename AnalysisResultMapT::const_iterator RI = AnalysisResults.find({ID, &IR}); return RI == AnalysisResults.end() ? nullptr : &*RI->second->second; } - /// \brief Invalidate a function pass result. + /// Invalidate a function pass result. void invalidateImpl(AnalysisKey *ID, IRUnitT &IR) { typename AnalysisResultMapT::iterator RI = AnalysisResults.find({ID, &IR}); @@ -895,38 +895,38 @@ private: AnalysisResults.erase(RI); } - /// \brief Map type from module analysis pass ID to pass concept pointer. + /// Map type from module analysis pass ID to pass concept pointer. using AnalysisPassMapT = DenseMap<AnalysisKey *, std::unique_ptr<PassConceptT>>; - /// \brief Collection of module analysis passes, indexed by ID. + /// Collection of module analysis passes, indexed by ID. AnalysisPassMapT AnalysisPasses; - /// \brief Map from function to a list of function analysis results. + /// Map from function to a list of function analysis results. /// /// Provides linear time removal of all analysis results for a function and /// the ultimate storage for a particular cached analysis result. AnalysisResultListMapT AnalysisResultLists; - /// \brief Map from an analysis ID and function to a particular cached + /// Map from an analysis ID and function to a particular cached /// analysis result. AnalysisResultMapT AnalysisResults; - /// \brief Indicates whether we log to \c llvm::dbgs(). + /// Indicates whether we log to \c llvm::dbgs(). bool DebugLogging; }; extern template class AnalysisManager<Module>; -/// \brief Convenience typedef for the Module analysis manager. +/// Convenience typedef for the Module analysis manager. using ModuleAnalysisManager = AnalysisManager<Module>; extern template class AnalysisManager<Function>; -/// \brief Convenience typedef for the Function analysis manager. +/// Convenience typedef for the Function analysis manager. using FunctionAnalysisManager = AnalysisManager<Function>; -/// \brief An analysis over an "outer" IR unit that provides access to an +/// An analysis over an "outer" IR unit that provides access to an /// analysis manager over an "inner" IR unit. The inner unit must be contained /// in the outer unit. /// @@ -977,10 +977,10 @@ public: return *this; } - /// \brief Accessor for the analysis manager. + /// Accessor for the analysis manager. AnalysisManagerT &getManager() { return *InnerAM; } - /// \brief Handler for invalidation of the outer IR unit, \c IRUnitT. + /// Handler for invalidation of the outer IR unit, \c IRUnitT. /// /// If the proxy analysis itself is not preserved, we assume that the set of /// inner IR objects contained in IRUnit may have changed. In this case, @@ -1001,7 +1001,7 @@ public: explicit InnerAnalysisManagerProxy(AnalysisManagerT &InnerAM) : InnerAM(&InnerAM) {} - /// \brief Run the analysis pass and create our proxy result object. + /// Run the analysis pass and create our proxy result object. /// /// This doesn't do any interesting work; it is primarily used to insert our /// proxy result object into the outer analysis cache so that we can proxy @@ -1040,7 +1040,7 @@ bool FunctionAnalysisManagerModuleProxy::Result::invalidate( extern template class InnerAnalysisManagerProxy<FunctionAnalysisManager, Module>; -/// \brief An analysis over an "inner" IR unit that provides access to an +/// An analysis over an "inner" IR unit that provides access to an /// analysis manager over a "outer" IR unit. The inner unit must be contained /// in the outer unit. /// @@ -1063,7 +1063,7 @@ class OuterAnalysisManagerProxy : public AnalysisInfoMixin< OuterAnalysisManagerProxy<AnalysisManagerT, IRUnitT, ExtraArgTs...>> { public: - /// \brief Result proxy object for \c OuterAnalysisManagerProxy. + /// Result proxy object for \c OuterAnalysisManagerProxy. class Result { public: explicit Result(const AnalysisManagerT &AM) : AM(&AM) {} @@ -1130,7 +1130,7 @@ public: OuterAnalysisManagerProxy(const AnalysisManagerT &AM) : AM(&AM) {} - /// \brief Run the analysis pass and create our proxy result object. + /// Run the analysis pass and create our proxy result object. /// Nothing to see here, it just forwards the \c AM reference into the /// result. Result run(IRUnitT &, AnalysisManager<IRUnitT, ExtraArgTs...> &, @@ -1157,7 +1157,7 @@ extern template class OuterAnalysisManagerProxy<ModuleAnalysisManager, using ModuleAnalysisManagerFunctionProxy = OuterAnalysisManagerProxy<ModuleAnalysisManager, Function>; -/// \brief Trivial adaptor that maps from a module to its functions. +/// Trivial adaptor that maps from a module to its functions. /// /// Designed to allow composition of a FunctionPass(Manager) and /// a ModulePassManager, by running the FunctionPass(Manager) over every @@ -1187,7 +1187,7 @@ public: explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass) : Pass(std::move(Pass)) {} - /// \brief Runs the function pass across every function in the module. + /// Runs the function pass across every function in the module. PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) { FunctionAnalysisManager &FAM = AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager(); @@ -1223,7 +1223,7 @@ private: FunctionPassT Pass; }; -/// \brief A function to deduce a function pass type and wrap it in the +/// A function to deduce a function pass type and wrap it in the /// templated adaptor. template <typename FunctionPassT> ModuleToFunctionPassAdaptor<FunctionPassT> @@ -1231,7 +1231,7 @@ createModuleToFunctionPassAdaptor(FunctionPassT Pass) { return ModuleToFunctionPassAdaptor<FunctionPassT>(std::move(Pass)); } -/// \brief A utility pass template to force an analysis result to be available. +/// A utility pass template to force an analysis result to be available. /// /// If there are extra arguments at the pass's run level there may also be /// extra arguments to the analysis manager's \c getResult routine. We can't @@ -1246,7 +1246,7 @@ template <typename AnalysisT, typename IRUnitT, struct RequireAnalysisPass : PassInfoMixin<RequireAnalysisPass<AnalysisT, IRUnitT, AnalysisManagerT, ExtraArgTs...>> { - /// \brief Run this pass over some unit of IR. + /// Run this pass over some unit of IR. /// /// This pass can be run over any unit of IR and use any analysis manager /// provided they satisfy the basic API requirements. When this pass is @@ -1261,12 +1261,12 @@ struct RequireAnalysisPass } }; -/// \brief A no-op pass template which simply forces a specific analysis result +/// A no-op pass template which simply forces a specific analysis result /// to be invalidated. template <typename AnalysisT> struct InvalidateAnalysisPass : PassInfoMixin<InvalidateAnalysisPass<AnalysisT>> { - /// \brief Run this pass over some unit of IR. + /// Run this pass over some unit of IR. /// /// This pass can be run over any unit of IR and use any analysis manager, /// provided they satisfy the basic API requirements. When this pass is @@ -1280,12 +1280,12 @@ struct InvalidateAnalysisPass } }; -/// \brief A utility pass that does nothing, but preserves no analyses. +/// A utility pass that does nothing, but preserves no analyses. /// /// Because this preserves no analyses, any analysis passes queried after this /// pass runs will recompute fresh results. struct InvalidateAllAnalysesPass : PassInfoMixin<InvalidateAllAnalysesPass> { - /// \brief Run this pass over some unit of IR. + /// Run this pass over some unit of IR. template <typename IRUnitT, typename AnalysisManagerT, typename... ExtraArgTs> PreservedAnalyses run(IRUnitT &, AnalysisManagerT &, ExtraArgTs &&...) { return PreservedAnalyses::none(); |