LLVM API Documentation
#include "llvm/PassManagers.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Timer.h"#include "llvm/Module.h"#include "llvm/ModuleProvider.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/Streams.h"#include "llvm/Support/ManagedStatic.h"#include "llvm/Support/raw_ostream.h"#include "llvm/System/Mutex.h"#include "llvm/System/Threading.h"#include "llvm/Analysis/Dominators.h"#include "llvm-c/Core.h"#include <algorithm>#include <cstdio>#include <map>
Go to the source code of this file.
Namespaces | |
| namespace | llvm |
Classes | |
| class | llvm::FunctionPassManagerImpl |
| FunctionPassManagerImpl manages FPPassManagers. More... | |
| class | llvm::MPPassManager |
| class | llvm::PassManagerImpl |
| PassManagerImpl manages MPPassManagers. More... | |
Enumerations | |
| enum | llvm::PassDebugLevel { llvm::None, llvm::Arguments, llvm::Structure, llvm::Executions, llvm::Details } |
Functions | |
| void | llvm::StartPassTimer (Pass *P) |
| If TimingInfo is enabled then start pass timer. | |
| void | llvm::StopPassTimer (Pass *P) |
| If TimingInfo is enabled then stop pass timer. | |
| LLVMPassManagerRef | LLVMCreatePassManager () |
| LLVMPassManagerRef | LLVMCreateFunctionPassManager (LLVMModuleProviderRef P) |
| int | LLVMRunPassManager (LLVMPassManagerRef PM, LLVMModuleRef M) |
| int | LLVMInitializeFunctionPassManager (LLVMPassManagerRef FPM) |
| int | LLVMRunFunctionPassManager (LLVMPassManagerRef FPM, LLVMValueRef F) |
| int | LLVMFinalizeFunctionPassManager (LLVMPassManagerRef FPM) |
| void | LLVMDisposePassManager (LLVMPassManagerRef PM) |
Variables | |
| bool | llvm::VerifyDomInfo = false |
| static cl::opt< bool, true > | llvm::VerifyDomInfoX ("verify-dom-info", cl::location(VerifyDomInfo), cl::desc("Verify dominator info (time consuming)")) |
| static cl::opt< enum PassDebugLevel > | llvm::PassDebugging ("debug-pass", cl::Hidden, cl::desc("Print PassManager debugging information"), cl::values(clEnumVal(None,"disable debug output"), clEnumVal(Arguments,"print pass arguments to pass to 'opt'"), clEnumVal(Structure,"print pass structure before run()"), clEnumVal(Executions,"print pass name before it is executed"), clEnumVal(Details,"print pass details when it is executed"), clEnumValEnd)) |
| static ManagedStatic < sys::SmartMutex< true > > | TimingInfoMutex |
| static TimingInfo * | TheTimeInfo |
| static cl::opt< bool, true > | EnableTiming ("time-passes", cl::location(TimePassesIsEnabled), cl::desc("Time each pass, printing elapsed time for each on exit")) |
| LLVMPassManagerRef LLVMCreateFunctionPassManager | ( | LLVMModuleProviderRef | MP | ) |
Constructs a new function-by-function pass pipeline over the module provider. It does not take ownership of the module provider. This type of pipeline is suitable for code generation and JIT compilation tasks. See llvm::FunctionPassManager::FunctionPassManager.
Definition at line 1737 of file PassManager.cpp.
| LLVMPassManagerRef LLVMCreatePassManager | ( | void | ) |
Constructs a new whole-module pass pipeline. This type of pipeline is suitable for link-time optimization and whole-module transformations. See llvm::PassManager::PassManager.
Definition at line 1733 of file PassManager.cpp.
| void LLVMDisposePassManager | ( | LLVMPassManagerRef | PM | ) |
Frees the memory of a pass pipeline. For function pipelines, does not free the module provider. See llvm::PassManagerBase::~PassManagerBase.
Definition at line 1757 of file PassManager.cpp.
| int LLVMFinalizeFunctionPassManager | ( | LLVMPassManagerRef | FPM | ) |
Finalizes all of the function passes scheduled in in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doFinalization.
Definition at line 1753 of file PassManager.cpp.
| int LLVMInitializeFunctionPassManager | ( | LLVMPassManagerRef | FPM | ) |
Initializes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doInitialization.
Definition at line 1745 of file PassManager.cpp.
| int LLVMRunFunctionPassManager | ( | LLVMPassManagerRef | FPM, | |
| LLVMValueRef | F | |||
| ) |
Executes all of the function passes scheduled in the function pass manager on the provided function. Returns 1 if any of the passes modified the function, false otherwise. See llvm::FunctionPassManager::run(Function&).
Definition at line 1749 of file PassManager.cpp.
| int LLVMRunPassManager | ( | LLVMPassManagerRef | PM, | |
| LLVMModuleRef | M | |||
| ) |
Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::PassManager::run(Module&).
Definition at line 1741 of file PassManager.cpp.
cl::opt<bool,true> EnableTiming("time-passes", cl::location(TimePassesIsEnabled), cl::desc("Time each pass, printing elapsed time for each on exit")) [static] |
char ID [static] |
Definition at line 114 of file PassManager.cpp.
Definition at line 374 of file PassManager.cpp.
TimingInfo* TheTimeInfo [static] |
Definition at line 416 of file PassManager.cpp.
Referenced by llvm::PMDataManager::removeDeadPasses(), llvm::FPPassManager::runOnFunction(), llvm::MPPassManager::runOnModule(), llvm::StartPassTimer(), and llvm::StopPassTimer().
| std::map<Pass*, Timer> TimingData |
Definition at line 373 of file PassManager.cpp.
ManagedStatic<sys::SmartMutex<true> > TimingInfoMutex [static] |
TimingInfo Class - This class is used to calculate information about the amount of time each pass takes to execute. This only happens when -time-passes is enabled on the command line.
Definition at line 370 of file PassManager.cpp.