|
LLVM
3.7.0
|
C++ class which implements the opaque lto_code_gen_t type. More...
#include <LTOCodeGenerator.h>
Public Member Functions | |
| LTOCodeGenerator () | |
| LTOCodeGenerator (std::unique_ptr< LLVMContext > Context) | |
| ~LTOCodeGenerator () | |
| bool | addModule (struct LTOModule *) |
| void | setModule (struct LTOModule *) |
| void | setTargetOptions (TargetOptions options) |
| void | setDebugInfo (lto_debug_model) |
| void | setCodePICModel (lto_codegen_model) |
| void | setCpu (const char *mCpu) |
| void | setAttr (const char *mAttr) |
| void | setOptLevel (unsigned optLevel) |
| void | setShouldInternalize (bool Value) |
| void | setShouldEmbedUselists (bool Value) |
| void | addMustPreserveSymbol (StringRef sym) |
| void | setCodeGenDebugOptions (const char *opts) |
| setCodeGenDebugOptions - Set codegen debugging options to aid in debugging LTO problems. More... | |
| void | parseCodeGenDebugOptions () |
| bool | writeMergedModules (const char *path, std::string &errMsg) |
| bool | compile_to_file (const char **name, bool disableInline, bool disableGVNLoadPRE, bool disableVectorization, std::string &errMsg) |
| std::unique_ptr< MemoryBuffer > | compile (bool disableInline, bool disableGVNLoadPRE, bool disableVectorization, std::string &errMsg) |
| bool | optimize (bool disableInline, bool disableGVNLoadPRE, bool disableVectorization, std::string &errMsg) |
| Optimize merged modules using various IPO passes. More... | |
| std::unique_ptr< MemoryBuffer > | compileOptimized (std::string &errMsg) |
| void | setDiagnosticHandler (lto_diagnostic_handler_t, void *) |
| LLVMContext & | getContext () |
Static Public Member Functions | |
| static const char * | getVersionString () |
C++ class which implements the opaque lto_code_gen_t type.
Definition at line 61 of file LTOCodeGenerator.h.
| LTOCodeGenerator::LTOCodeGenerator | ( | ) |
Definition at line 66 of file LTOCodeGenerator.cpp.
| LTOCodeGenerator::LTOCodeGenerator | ( | std::unique_ptr< LLVMContext > | Context | ) |
Definition at line 71 of file LTOCodeGenerator.cpp.
| LTOCodeGenerator::~LTOCodeGenerator | ( | ) |
Definition at line 87 of file LTOCodeGenerator.cpp.
References I.
Definition at line 129 of file LTOCodeGenerator.cpp.
References llvm::LTOModule::getAsmUndefinedRefs(), llvm::Module::getContext(), llvm::LTOModule::getModule(), and llvm::Linker::linkInModule().
|
inline |
Definition at line 85 of file LTOCodeGenerator.h.
| std::unique_ptr< MemoryBuffer > LTOCodeGenerator::compile | ( | bool | disableInline, |
| bool | disableGVNLoadPRE, | ||
| bool | disableVectorization, | ||
| std::string & | errMsg | ||
| ) |
Definition at line 288 of file LTOCodeGenerator.cpp.
References compileOptimized(), and optimize().
| bool LTOCodeGenerator::compile_to_file | ( | const char ** | name, |
| bool | disableInline, | ||
| bool | disableGVNLoadPRE, | ||
| bool | disableVectorization, | ||
| std::string & | errMsg | ||
| ) |
Definition at line 275 of file LTOCodeGenerator.cpp.
References optimize().
| std::unique_ptr< MemoryBuffer > LTOCodeGenerator::compileOptimized | ( | std::string & | errMsg | ) |
Definition at line 254 of file LTOCodeGenerator.cpp.
References llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), name, and llvm::sys::fs::remove().
Referenced by compile().
|
inline |
Definition at line 138 of file LTOCodeGenerator.h.
|
static |
Definition at line 58 of file LTOCodeGenerator.cpp.
| bool LTOCodeGenerator::optimize | ( | bool | disableInline, |
| bool | disableGVNLoadPRE, | ||
| bool | disableVectorization, | ||
| std::string & | errMsg | ||
| ) |
Optimize merged modules using various IPO passes.
Definition at line 508 of file LTOCodeGenerator.cpp.
References llvm::legacy::PassManager::add(), llvm::createFunctionInliningPass(), llvm::createTargetTransformInfoWrapperPass(), llvm::PassManagerBuilder::DisableGVNLoadPRE, llvm::TargetMachine::getDataLayout(), llvm::Linker::getModule(), llvm::TargetMachine::getTargetIRAnalysis(), llvm::TargetMachine::getTargetTriple(), llvm::legacy::PassManager::run(), and llvm::Module::setDataLayout().
Referenced by compile(), and compile_to_file().
| void LTOCodeGenerator::parseCodeGenDebugOptions | ( | ) |
Definition at line 587 of file LTOCodeGenerator.cpp.
References llvm::cl::ParseCommandLineOptions().
|
inline |
Definition at line 79 of file LTOCodeGenerator.h.
| void LTOCodeGenerator::setCodeGenDebugOptions | ( | const char * | options | ) |
setCodeGenDebugOptions - Set codegen debugging options to aid in debugging LTO problems.
Definition at line 576 of file LTOCodeGenerator.cpp.
References llvm::getToken().
| void LTOCodeGenerator::setCodePICModel | ( | lto_codegen_model | model | ) |
Definition at line 175 of file LTOCodeGenerator.cpp.
References llvm_unreachable, LTO_CODEGEN_PIC_MODEL_DEFAULT, LTO_CODEGEN_PIC_MODEL_DYNAMIC, LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC, and LTO_CODEGEN_PIC_MODEL_STATIC.
|
inline |
Definition at line 78 of file LTOCodeGenerator.h.
| void LTOCodeGenerator::setDebugInfo | ( | lto_debug_model | debug | ) |
Definition at line 162 of file LTOCodeGenerator.cpp.
References llvm_unreachable, LTO_DEBUG_MODEL_DWARF, and LTO_DEBUG_MODEL_NONE.
| void LTOCodeGenerator::setDiagnosticHandler | ( | lto_diagnostic_handler_t | DiagHandler, |
| void * | Ctxt | ||
| ) |
Definition at line 630 of file LTOCodeGenerator.cpp.
| void LTOCodeGenerator::setModule | ( | struct LTOModule * | Mod | ) |
Definition at line 142 of file LTOCodeGenerator.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::clear(), llvm::LTOModule::getAsmUndefinedRefs(), llvm::Module::getContext(), llvm::LTOModule::getModule(), I, and llvm::Linker::setModule().
|
inline |
Definition at line 80 of file LTOCodeGenerator.h.
|
inline |
Definition at line 83 of file LTOCodeGenerator.h.
|
inline |
Definition at line 82 of file LTOCodeGenerator.h.
| void LTOCodeGenerator::setTargetOptions | ( | TargetOptions | options | ) |
Definition at line 158 of file LTOCodeGenerator.cpp.
Definition at line 187 of file LTOCodeGenerator.cpp.
References llvm::raw_fd_ostream::clear_error(), llvm::raw_fd_ostream::close(), llvm::sys::fs::F_None, llvm::Linker::getModule(), llvm::raw_fd_ostream::has_error(), llvm::tool_output_file::keep(), llvm::tool_output_file::os(), and llvm::WriteBitcodeToFile().
1.8.6