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/Streams.h"#include "llvm/Support/ManagedStatic.h"#include "llvm/Analysis/Dominators.h"#include "llvm-c/Core.h"#include <algorithm>#include <cstdio>#include <vector>#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 | StartPassTimer (Pass *P) |
| If TimingInfo is enabled then start pass timer. | |
| void | 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 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 1687 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 1683 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 1707 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 1703 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 1695 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 1699 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 1691 of file PassManager.cpp.
| void StartPassTimer | ( | Pass * | P | ) |
If TimingInfo is enabled then start pass timer.
Definition at line 1526 of file PassManager.cpp.
References TheTimeInfo.
Referenced by llvm::LPPassManager::runOnFunction().
| void StopPassTimer | ( | Pass * | P | ) |
If TimingInfo is enabled then stop pass timer.
Definition at line 1532 of file PassManager.cpp.
References TheTimeInfo.
Referenced by llvm::LPPassManager::runOnFunction().
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 75 of file PassManager.cpp.
Definition at line 330 of file PassManager.cpp.
TimingInfo* TheTimeInfo [static] |
Definition at line 371 of file PassManager.cpp.
Referenced by llvm::PMDataManager::removeDeadPasses(), llvm::FPPassManager::runOnFunction(), llvm::MPPassManager::runOnModule(), StartPassTimer(), and StopPassTimer().
| std::map<Pass*, Timer> TimingData |
Definition at line 329 of file PassManager.cpp.