LLVM API Documentation
#include <TargetMachine.h>
Public Member Functions | |
void | addAnalysisPasses (PassManagerBase &PM) override |
Register analysis passes for this target with a pass manager. | |
virtual TargetPassConfig * | createPassConfig (PassManagerBase &PM) |
bool | addPassesToEmitFile (PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, bool DisableVerify=true, AnalysisID StartAfter=nullptr, AnalysisID StopAfter=nullptr) override |
bool | addPassesToEmitMC (PassManagerBase &PM, MCContext *&Ctx, raw_ostream &OS, bool DisableVerify=true) override |
Protected Member Functions | |
LLVMTargetMachine (const Target &T, StringRef TargetTriple, StringRef CPU, StringRef FS, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) | |
void | initAsmInfo () |
LLVMTargetMachine - This class describes a target machine that is implemented with the LLVM target-independent code generator.
Definition at line 224 of file Target/TargetMachine.h.
LLVMTargetMachine::LLVMTargetMachine | ( | const Target & | T, |
StringRef | TargetTriple, | ||
StringRef | CPU, | ||
StringRef | FS, | ||
TargetOptions | Options, | ||
Reloc::Model | RM, | ||
CodeModel::Model | CM, | ||
CodeGenOpt::Level | OL | ||
) | [protected] |
Definition at line 70 of file LLVMTargetMachine.cpp.
References llvm::TargetMachine::CodeGenInfo, and llvm::Target::createMCCodeGenInfo().
void LLVMTargetMachine::addAnalysisPasses | ( | PassManagerBase & | PM | ) | [override, virtual] |
Register analysis passes for this target with a pass manager.
This registers target independent analysis passes.
Reimplemented from llvm::TargetMachine.
Reimplemented in llvm::AMDGPUTargetMachine, llvm::AArch64TargetMachine, llvm::PPCTargetMachine, llvm::MipsTargetMachine, llvm::ARMBaseTargetMachine, llvm::final< T >, and llvm::XCoreTargetMachine.
Definition at line 79 of file LLVMTargetMachine.cpp.
References llvm::createBasicTargetTransformInfoPass().
Referenced by addPassesToGenerateCode().
bool LLVMTargetMachine::addPassesToEmitFile | ( | PassManagerBase & | PM, |
formatted_raw_ostream & | Out, | ||
CodeGenFileType | FileType, | ||
bool | DisableVerify = true , |
||
AnalysisID | StartAfter = nullptr , |
||
AnalysisID | StopAfter = nullptr |
||
) | [override, virtual] |
addPassesToEmitFile - Add passes to the specified pass manager to get the specified file emitted. Typically this will involve several steps of code generation.
Reimplemented from llvm::TargetMachine.
Definition at line 138 of file LLVMTargetMachine.cpp.
References addPassesToGenerateCode(), llvm::MCTargetOptions::AsmVerbose, llvm::TargetMachine::CGFT_AssemblyFile, llvm::TargetMachine::CGFT_Null, llvm::TargetMachine::CGFT_ObjectFile, llvm::Target::createAsmPrinter(), llvm::Target::createAsmStreamer(), llvm::createJumpInstrTableInfoPass(), llvm::createJumpInstrTablesPass(), llvm::Target::createMCAsmBackend(), llvm::Target::createMCCodeEmitter(), llvm::Target::createMCInstPrinter(), llvm::createNullStreamer(), llvm::createPrintModulePass(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetMachine::getMCAsmInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetMachine::getTarget(), llvm::TargetMachine::getTargetTriple(), llvm::TargetOptions::JTType, llvm::MCTargetOptions::MCNoExecStack, llvm::TargetOptions::MCOptions, llvm::MCTargetOptions::MCRelaxAll, llvm::MCTargetOptions::MCSaveTempLabels, llvm::MCTargetOptions::MCUseDwarfDirectory, llvm::TargetMachine::Options, Printer, llvm::MCAsmBackend::reset(), llvm::MCStreamer::reset(), llvm::MCContext::setAllowTemporaryLabels(), llvm::MCTargetOptions::ShowMCEncoding, llvm::MCTargetOptions::ShowMCInst, and llvm::TargetMachine::TargetCPU.
bool LLVMTargetMachine::addPassesToEmitMC | ( | PassManagerBase & | PM, |
MCContext *& | Ctx, | ||
raw_ostream & | Out, | ||
bool | DisableVerify = true |
||
) | [override, virtual] |
addPassesToEmitMC - Add passes to the specified pass manager to get machine code emitted with the MCJIT. This method returns true if machine code is not supported. It fills the MCContext Ctx pointer which can be used to build custom MCStreamer.
Reimplemented from llvm::TargetMachine.
Reimplemented in llvm::NVPTXTargetMachine.
Definition at line 234 of file LLVMTargetMachine.cpp.
References addPassesToGenerateCode(), llvm::Target::createAsmPrinter(), llvm::Target::createMCAsmBackend(), llvm::Target::createMCCodeEmitter(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetMachine::getTarget(), llvm::TargetMachine::getTargetTriple(), llvm::MCTargetOptions::MCNoExecStack, llvm::TargetOptions::MCOptions, llvm::MCTargetOptions::MCRelaxAll, llvm::MCTargetOptions::MCSaveTempLabels, llvm::TargetMachine::Options, Printer, llvm::MCAsmBackend::reset(), llvm::MCContext::setAllowTemporaryLabels(), and llvm::TargetMachine::TargetCPU.
TargetPassConfig * LLVMTargetMachine::createPassConfig | ( | PassManagerBase & | PM | ) | [virtual] |
createPassConfig - Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of CodeGen passes.
createPassConfig - Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of CodeGen passes.
Targets may override this to extend TargetPassConfig.
Reimplemented in llvm::MipsTargetMachine, llvm::NVPTXTargetMachine, llvm::AMDGPUTargetMachine, llvm::ARMBaseTargetMachine, llvm::final< T >, llvm::AArch64TargetMachine, llvm::HexagonTargetMachine, llvm::SystemZTargetMachine, llvm::MSP430TargetMachine, llvm::PPCTargetMachine, llvm::SparcTargetMachine, and llvm::XCoreTargetMachine.
Definition at line 273 of file Passes.cpp.
Referenced by addPassesToGenerateCode().
void LLVMTargetMachine::initAsmInfo | ( | ) | [protected] |
Definition at line 50 of file LLVMTargetMachine.cpp.
References llvm::TargetMachine::AsmInfo, llvm::TargetOptions::CompressDebugSections, llvm::Target::createMCAsmInfo(), llvm::TargetOptions::DisableIntegratedAS, llvm::TargetMachine::getSubtargetImpl(), llvm::TargetMachine::getTargetTriple(), llvm::TargetMachine::Options, llvm::MCAsmInfo::setCompressDebugSections(), llvm::MCAsmInfo::setUseIntegratedAssembler(), and llvm::TargetMachine::TheTarget.
Referenced by llvm::AArch64TargetMachine::AArch64TargetMachine(), llvm::AMDGPUTargetMachine::AMDGPUTargetMachine(), llvm::ARMTargetMachine::ARMTargetMachine(), llvm::HexagonTargetMachine::HexagonTargetMachine(), llvm::MipsTargetMachine::MipsTargetMachine(), llvm::MSP430TargetMachine::MSP430TargetMachine(), llvm::NVPTXTargetMachine::NVPTXTargetMachine(), llvm::PPCTargetMachine::PPCTargetMachine(), llvm::SparcTargetMachine::SparcTargetMachine(), llvm::SystemZTargetMachine::SystemZTargetMachine(), llvm::ThumbTargetMachine::ThumbTargetMachine(), and llvm::XCoreTargetMachine::XCoreTargetMachine().