class FunctionToLoopPassAdaptor
Declaration
class FunctionToLoopPassAdaptor : public PassInfoMixin { /* full declaration omitted */ };
Description
Adaptor that maps from a function to its loops. Designed to allow composition of a LoopPass(Manager) and a FunctionPassManager. Note that if this pass is constructed with a \c FunctionAnalysisManager it will run the \c LoopAnalysisManagerFunctionProxy analysis prior to running the loop passes over the function to enable a \c LoopAnalysisManager to be used within this run safely. The adaptor comes with two modes: the loop mode and the loop-nest mode, and the worklist updater lived inside will be in the same mode as the adaptor (refer to the documentation of \c LPMUpdater for more detailed explanation). Specifically, in loop mode, all loops in the funciton will be pushed into the worklist and processed by \p Pass, while only top-level loops are processed in loop-nest mode. Please refer to the various specializations of mode are used.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:425
Inherits from: PassInfoMixin
Member Variables
- private std::unique_ptr<PassConceptT> Pass
- private llvm::FunctionPassManager LoopCanonicalizationFPM
- private bool UseMemorySSA = false
- private bool UseBlockFrequencyInfo = false
- private bool UseBranchProbabilityInfo = false
- private const bool LoopNestMode
Method Overview
- public FunctionToLoopPassAdaptor(std::unique_ptr<PassConceptT> Pass, bool UseMemorySSA = false, bool UseBlockFrequencyInfo = false, bool UseBranchProbabilityInfo = false, bool LoopNestMode = false)
- public bool isLoopNestMode() const
- public static bool isRequired()
- public void printPipeline(llvm::raw_ostream & OS, function_ref<llvm::StringRef (llvm::StringRef)> MapClassName2PassName)
- public llvm::PreservedAnalyses run(llvm::Function & F, llvm::FunctionAnalysisManager & AM)
Methods
¶FunctionToLoopPassAdaptor(
std::unique_ptr<PassConceptT> Pass,
bool UseMemorySSA = false,
bool UseBlockFrequencyInfo = false,
bool UseBranchProbabilityInfo = false,
bool LoopNestMode = false)
FunctionToLoopPassAdaptor(
std::unique_ptr<PassConceptT> Pass,
bool UseMemorySSA = false,
bool UseBlockFrequencyInfo = false,
bool UseBranchProbabilityInfo = false,
bool LoopNestMode = false)
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:432
Parameters
- std::unique_ptr<PassConceptT> Pass
- bool UseMemorySSA = false
- bool UseBlockFrequencyInfo = false
- bool UseBranchProbabilityInfo = false
- bool LoopNestMode = false
¶bool isLoopNestMode() const
bool isLoopNestMode() const
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:452
¶static bool isRequired()
static bool isRequired()
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:450
¶void printPipeline(
llvm::raw_ostream& OS,
function_ref<llvm::StringRef(llvm::StringRef)>
MapClassName2PassName)
void printPipeline(
llvm::raw_ostream& OS,
function_ref<llvm::StringRef(llvm::StringRef)>
MapClassName2PassName)
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:447
Parameters
- llvm::raw_ostream& OS
- function_ref<llvm::StringRef(llvm::StringRef)> MapClassName2PassName
¶llvm::PreservedAnalyses run(
llvm::Function& F,
llvm::FunctionAnalysisManager& AM)
llvm::PreservedAnalyses run(
llvm::Function& F,
llvm::FunctionAnalysisManager& AM)
Description
Runs the loop passes across every loop in the function.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:446