|
LLVM
4.0.0
|
Primary interface to the complete machine description for the target machine. More...
#include <TargetMachine.h>
Public Types | |
| enum | CodeGenFileType { CGFT_AssemblyFile, CGFT_ObjectFile, CGFT_Null } |
| These enums are meant to be passed into addPassesToEmitFile to indicate what type of file to emit, and returned by it to indicate what type of file could actually be made. More... | |
Public Member Functions | |
| TargetMachine (const TargetMachine &)=delete | |
| void | operator= (const TargetMachine &)=delete |
| virtual | ~TargetMachine () |
| const Target & | getTarget () const |
| const Triple & | getTargetTriple () const |
| StringRef | getTargetCPU () const |
| StringRef | getTargetFeatureString () const |
| virtual const TargetSubtargetInfo * | getSubtargetImpl (const Function &) const |
| Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInfo-derived member variable. More... | |
| virtual TargetLoweringObjectFile * | getObjFileLowering () const |
| template<typename STC > | |
| const STC & | getSubtarget (const Function &F) const |
| This method returns a pointer to the specified type of TargetSubtargetInfo. More... | |
| const DataLayout | createDataLayout () const |
| Create a DataLayout. More... | |
| bool | isCompatibleDataLayout (const DataLayout &Candidate) const |
| Test if a DataLayout if compatible with the CodeGen for this target. More... | |
| unsigned | getPointerSize () const |
| Get the pointer size for this target. More... | |
| void | resetTargetOptions (const Function &F) const |
| Reset the target options based on the function's attributes. More... | |
| const MCAsmInfo * | getMCAsmInfo () const |
| Return target specific asm information. More... | |
| const MCRegisterInfo * | getMCRegisterInfo () const |
| const MCInstrInfo * | getMCInstrInfo () const |
| const MCSubtargetInfo * | getMCSubtargetInfo () const |
| virtual const TargetIntrinsicInfo * | getIntrinsicInfo () const |
| If intrinsic information is available, return it. If not, return null. More... | |
| bool | requiresStructuredCFG () const |
| void | setRequiresStructuredCFG (bool Value) |
| Reloc::Model | getRelocationModel () const |
| Returns the code generation relocation model. More... | |
| CodeModel::Model | getCodeModel () const |
| Returns the code model. More... | |
| bool | isPositionIndependent () const |
| bool | shouldAssumeDSOLocal (const Module &M, const GlobalValue *GV) const |
| TLSModel::Model | getTLSModel (const GlobalValue *GV) const |
| Returns the TLS model which should be used for the given global variable. More... | |
| CodeGenOpt::Level | getOptLevel () const |
| Returns the optimization level: None, Less, Default, or Aggressive. More... | |
| void | setOptLevel (CodeGenOpt::Level Level) |
| Overrides the optimization level. More... | |
| void | setFastISel (bool Enable) |
| bool | getO0WantsFastISel () |
| void | setO0WantsFastISel (bool Enable) |
| bool | shouldPrintMachineCode () const |
| bool | getUniqueSectionNames () const |
| bool | getDataSections () const |
| Return true if data objects should be emitted into their own section, corresponds to -fdata-sections. More... | |
| bool | getFunctionSections () const |
| Return true if functions should be emitted into their own section, corresponding to -ffunction-sections. More... | |
| virtual TargetIRAnalysis | getTargetIRAnalysis () |
Get a TargetIRAnalysis appropriate for the target. More... | |
| virtual void | addEarlyAsPossiblePasses (PassManagerBase &) |
| Add target-specific function passes that should be run as early as possible in the optimization pipeline. More... | |
| virtual bool | addPassesToEmitFile (PassManagerBase &, raw_pwrite_stream &, CodeGenFileType, bool=true, AnalysisID=nullptr, AnalysisID=nullptr, AnalysisID=nullptr, AnalysisID=nullptr, MachineFunctionInitializer *=nullptr) |
| Add passes to the specified pass manager to get the specified file emitted. More... | |
| virtual bool | addPassesToEmitMC (PassManagerBase &, MCContext *&, raw_pwrite_stream &, bool=true) |
| Add passes to the specified pass manager to get machine code emitted with the MCJIT. More... | |
| virtual bool | targetSchedulesPostRAScheduling () const |
| True if subtarget inserts the final scheduling pass on its own. More... | |
| void | getNameWithPrefix (SmallVectorImpl< char > &Name, const GlobalValue *GV, Mangler &Mang, bool MayAlwaysUsePrivate=false) const |
| MCSymbol * | getSymbol (const GlobalValue *GV) const |
| virtual bool | usesPhysRegsForPEI () const |
| True if the target uses physical regs at Prolog/Epilog insertion time. More... | |
Public Attributes | |
| const TargetOptions | DefaultOptions |
| TargetOptions | Options |
Protected Member Functions | |
| TargetMachine (const Target &T, StringRef DataLayoutString, const Triple &TargetTriple, StringRef CPU, StringRef FS, const TargetOptions &Options) | |
Protected Attributes | |
| const Target & | TheTarget |
| The Target that this machine was created for. More... | |
| const DataLayout | DL |
| DataLayout for the target: keep ABI type size and alignment. More... | |
| Triple | TargetTriple |
| Triple string, CPU name, and target feature strings the TargetMachine instance is created with. More... | |
| std::string | TargetCPU |
| std::string | TargetFS |
| Reloc::Model | RM = Reloc::Static |
| CodeModel::Model | CMModel = CodeModel::Default |
| CodeGenOpt::Level | OptLevel = CodeGenOpt::Default |
| const MCAsmInfo * | AsmInfo |
| Contains target specific asm information. More... | |
| const MCRegisterInfo * | MRI |
| const MCInstrInfo * | MII |
| const MCSubtargetInfo * | STI |
| unsigned | RequireStructuredCFG: 1 |
| unsigned | O0WantsFastISel: 1 |
Primary interface to the complete machine description for the target machine.
All target-specific information should be accessible through this interface.
Definition at line 56 of file Target/TargetMachine.h.
These enums are meant to be passed into addPassesToEmitFile to indicate what type of file to emit, and returned by it to indicate what type of file could actually be made.
| Enumerator | |
|---|---|
| CGFT_AssemblyFile | |
| CGFT_ObjectFile | |
| CGFT_Null | |
Definition at line 216 of file Target/TargetMachine.h.
|
protected |
Definition at line 42 of file TargetMachine.cpp.
References EnableIPRA, and llvm::TargetOptions::EnableIPRA.
|
delete |
|
virtual |
|
inlinevirtual |
Add target-specific function passes that should be run as early as possible in the optimization pipeline.
Most TargetMachines have no such passes.
Reimplemented in llvm::NVPTXTargetMachine, and llvm::AMDGPUTargetMachine.
Definition at line 211 of file Target/TargetMachine.h.
|
inlinevirtual |
Add passes to the specified pass manager to get the specified file emitted.
Typically this will involve several steps of code generation. This method should return true if emission of this file type is not supported, or false on success.
Reimplemented in llvm::LLVMTargetMachine.
Definition at line 226 of file Target/TargetMachine.h.
Referenced by LLVMTargetMachineEmit().
|
inlinevirtual |
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 in llvm::LLVMTargetMachine, and llvm::NVPTXTargetMachine.
Definition at line 240 of file Target/TargetMachine.h.
Referenced by llvm::orc::SimpleCompiler::operator()().
|
inline |
Create a DataLayout.
Definition at line 124 of file Target/TargetMachine.h.
References DL.
Referenced by llvm::ComputeSignatureVTs(), and LLVMTargetMachineEmit().
| CodeModel::Model TargetMachine::getCodeModel | ( | ) | const |
Returns the code model.
The choices are small, kernel, medium, large, and target default.
Definition at line 101 of file TargetMachine.cpp.
References CMModel.
Referenced by llvm::AArch64TargetLowering::AArch64TargetLowering(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::AArch64Subtarget::ClassifyGlobalReference(), llvm::PPCSubtarget::classifyGlobalReference(), llvm::X86Subtarget::classifyGlobalReference(), llvm::ARMFrameLowering::emitPrologue(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::PPCTargetLowering::getPICJumpTableRelocBase(), llvm::PPCTargetLowering::getPICJumpTableRelocBaseExpr(), llvm::TargetLoweringObjectFile::Initialize(), llvm::X86TargetLowering::isLegalAddressingMode(), IsSmallObject(), llvm::LanaiTargetLowering::LowerConstantPool(), llvm::LanaiTargetLowering::LowerJumpTable(), llvm::SparcTargetLowering::makeAddress(), and llvm::XCoreTargetObjectFile::SelectSectionForGlobal().
|
inline |
Return true if data objects should be emitted into their own section, corresponds to -fdata-sections.
Definition at line 191 of file Target/TargetMachine.h.
References llvm::TargetOptions::DataSections.
Referenced by llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
|
inline |
Return true if functions should be emitted into their own section, corresponding to -ffunction-sections.
Definition at line 197 of file Target/TargetMachine.h.
References llvm::TargetOptions::FunctionSections.
Referenced by llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix(), llvm::TargetLoweringObjectFileELF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), resideInSameSection(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
|
inlinevirtual |
If intrinsic information is available, return it. If not, return null.
Reimplemented in llvm::AMDGPUTargetMachine.
Definition at line 153 of file Target/TargetMachine.h.
Referenced by llvm::SDNode::getOperationName(), llvm::AMDGPUTTIImpl::isSourceOfDivergence(), llvm::MIPrinter::print(), and llvm::MachineInstr::print().
Return target specific asm information.
Definition at line 146 of file Target/TargetMachine.h.
References AsmInfo.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::TargetPassConfig::addPassesToHandleExceptions(), llvm::X86FrameLowering::canUseLEAForSPInEpilogue(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::emitEpilogue(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::X86FrameLowering::emitPrologue(), ExpandMOVImmSExti8(), llvm::X86FrameLowering::getFrameIndexReference(), llvm::AArch64InstrInfo::getInstSizeInBytes(), llvm::MSP430InstrInfo::getInstSizeInBytes(), llvm::AVRInstrInfo::getInstSizeInBytes(), llvm::MipsInstrInfo::getInstSizeInBytes(), llvm::ARMBaseInstrInfo::getInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::getInstSizeInBytes(), llvm::SIInstrInfo::getInstSizeInBytes(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::HexagonInstrInfo::getSize(), llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), and LowerINTRINSIC_W_CHAIN().
|
inline |
Definition at line 149 of file Target/TargetMachine.h.
References MII.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
|
inline |
Definition at line 148 of file Target/TargetMachine.h.
References MRI.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
|
inline |
Definition at line 150 of file Target/TargetMachine.h.
References STI.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
| void TargetMachine::getNameWithPrefix | ( | SmallVectorImpl< char > & | Name, |
| const GlobalValue * | GV, | ||
| Mangler & | Mang, | ||
| bool | MayAlwaysUsePrivate = false |
||
| ) | const |
Definition at line 206 of file TargetMachine.cpp.
References llvm::Mangler::getNameWithPrefix(), llvm::TargetLoweringObjectFile::getNameWithPrefix(), getObjFileLowering(), and llvm::GlobalValue::hasPrivateLinkage().
Referenced by llvm::AsmPrinter::getNameWithPrefix(), getSymbol(), GetSymbolFromOperand(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), and selectELFSectionForGlobal().
|
inline |
Definition at line 182 of file Target/TargetMachine.h.
References O0WantsFastISel.
Referenced by addPassesToGenerateCode(), and llvm::OptLevelChanger::OptLevelChanger().
|
inlinevirtual |
Reimplemented in llvm::MipsTargetMachine, llvm::NVPTXTargetMachine, llvm::AMDGPUTargetMachine, llvm::ARMBaseTargetMachine, llvm::PPCTargetMachine, llvm::LanaiTargetMachine, llvm::AArch64TargetMachine, llvm::HexagonTargetMachine, llvm::SystemZTargetMachine, llvm::MSP430TargetMachine, llvm::WebAssemblyTargetMachine, llvm::X86TargetMachine, llvm::XCoreTargetMachine, llvm::SparcTargetMachine, llvm::AVRTargetMachine, llvm::BPFTargetMachine, and llvm::RISCVTargetMachine.
Definition at line 112 of file Target/TargetMachine.h.
Referenced by getNameWithPrefix(), llvm::AsmPrinter::getObjFileLowering(), getSymbol(), GetSymbolFromOperand(), llvm::LanaiTargetLowering::LowerConstantPool(), and llvm::LanaiTargetLowering::LowerGlobalAddress().
| CodeGenOpt::Level TargetMachine::getOptLevel | ( | ) | const |
Returns the optimization level: None, Less, Default, or Aggressive.
Definition at line 196 of file TargetMachine.cpp.
References OptLevel.
Referenced by addPassesToGenerateCode(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::PPCInstrInfo::getMachineCombinerPatterns(), llvm::TargetPassConfig::getOptLevel(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::HexagonFrameLowering::hasFP(), isOptNone(), llvm::SITargetLowering::PerformDAGCombine(), llvm::ARMAsmPrinter::runOnMachineFunction(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), and llvm::X86TargetLowering::X86TargetLowering().
|
inline |
Get the pointer size for this target.
This is the only time the DataLayout in the TargetMachine is used.
Definition at line 138 of file Target/TargetMachine.h.
References DL, and llvm::DataLayout::getPointerSize().
Referenced by llvm::AsmPrinter::emitXRayTable(), llvm::AsmPrinter::getPointerSize(), llvm::TargetFrameLowering::getStackAlignmentSkew(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| Reloc::Model TargetMachine::getRelocationModel | ( | ) | const |
Returns the code generation relocation model.
The choices are static, PIC, and dynamic-no-pic, and target default.
The choices are static, PIC, and dynamic-no-pic.
Definition at line 97 of file TargetMachine.cpp.
References RM.
Referenced by llvm::PPCSubtarget::classifyGlobalReference(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::MipsSubtarget::getRelocationModel(), getTLSModel(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::X86Subtarget::isLegalToCallImmediateAddr(), llvm::HexagonTargetLowering::isOffsetFoldingLegal(), isPositionIndependent(), llvm::ARMSubtarget::isROPI(), llvm::ARMSubtarget::isRWPI(), llvm::HexagonTargetLowering::LowerBlockAddress(), llvm::HexagonTargetLowering::LowerGLOBALADDRESS(), and shouldAssumeDSOLocal().
|
inline |
This method returns a pointer to the specified type of TargetSubtargetInfo.
In debug builds, it verifies that the object being returned is of the correct type.
Definition at line 119 of file Target/TargetMachine.h.
References getSubtargetImpl().
Referenced by llvm::ComputeLegalValueVTs(), and llvm::PhysicalRegisterUsageInfo::print().
|
inlinevirtual |
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInfo-derived member variable.
Reimplemented in llvm::GCNTargetMachine, llvm::R600TargetMachine, llvm::MipsTargetMachine, llvm::AMDGPUTargetMachine, llvm::ARMBaseTargetMachine, llvm::PPCTargetMachine, llvm::NVPTXTargetMachine, llvm::LanaiTargetMachine, llvm::MSP430TargetMachine, llvm::SystemZTargetMachine, llvm::AArch64TargetMachine, llvm::AVRTargetMachine, llvm::HexagonTargetMachine, llvm::SparcTargetMachine, llvm::WebAssemblyTargetMachine, llvm::X86TargetMachine, llvm::XCoreTargetMachine, and llvm::BPFTargetMachine.
Definition at line 109 of file Target/TargetMachine.h.
Referenced by llvm::X86TTIImpl::areInlineCompatible(), getSubtarget(), llvm::isInTailCallPosition(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), and llvm::StackProtector::runOnFunction().
| MCSymbol * TargetMachine::getSymbol | ( | const GlobalValue * | GV | ) | const |
Definition at line 219 of file TargetMachine.cpp.
References llvm::TargetLoweringObjectFile::getContext(), llvm::TargetLoweringObjectFile::getMangler(), getNameWithPrefix(), getObjFileLowering(), and llvm::MCContext::getOrCreateSymbol().
Referenced by llvm::X86_64MachoTargetObjectFile::getCFIPersonalitySymbol(), llvm::AArch64_MachoTargetObjectFile::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFile::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), llvm::AsmPrinter::getSymbol(), llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
Definition at line 101 of file Target/TargetMachine.h.
References TheTarget.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::EngineBuilder::create(), llvm::AsmPrinter::doInitialization(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 104 of file Target/TargetMachine.h.
References TargetCPU.
Referenced by llvm::AsmPrinter::doInitialization(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), llvm::AMDGPUTargetMachine::getGPUName(), and llvm::LLVMTargetMachine::initAsmInfo().
|
inline |
Definition at line 105 of file Target/TargetMachine.h.
References TargetFS.
Referenced by llvm::AsmPrinter::doInitialization(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), llvm::AMDGPUTargetMachine::getFeatureString(), and llvm::LLVMTargetMachine::initAsmInfo().
|
virtual |
Get a TargetIRAnalysis appropriate for the target.
This is used to construct the new pass manager's target IR analysis pass, set up appropriately for this target machine. Even the old pass manager uses this to answer queries about the IR.
Reimplemented in llvm::LLVMTargetMachine, llvm::NVPTXTargetMachine, llvm::AMDGPUTargetMachine, llvm::ARMBaseTargetMachine, llvm::PPCTargetMachine, llvm::MipsTargetMachine, llvm::WebAssemblyTargetMachine, llvm::LanaiTargetMachine, llvm::AArch64TargetMachine, llvm::SystemZTargetMachine, llvm::HexagonTargetMachine, llvm::XCoreTargetMachine, and llvm::X86TargetMachine.
Definition at line 200 of file TargetMachine.cpp.
References F, llvm::Module::getDataLayout(), and llvm::GlobalValue::getParent().
Definition at line 103 of file Target/TargetMachine.h.
References TargetTriple.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), canCombineSinCosLibcall(), createPPCAsmPrinterPass(), llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::doInitialization(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::DwarfDebug::DwarfDebug(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitStartOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), getCOFFSectionFlags(), llvm::ARMAsmPrinter::getISAEncoding(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::LLVMTargetMachine::initAsmInfo(), llvm::TargetLoweringObjectFile::Initialize(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::MipsSubtarget::initializeSubtargetDependencies(), llvm::PPCTargetMachine::isPPC64(), LLVMOrcCreateInstance(), llvm::AArch64MCInstLower::LowerSymbolOperand(), llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), shouldAssumeDSOLocal(), shouldLowerMemFuncForSize(), and llvm::TargetLoweringBase::TargetLoweringBase().
| TLSModel::Model TargetMachine::getTLSModel | ( | const GlobalValue * | GV | ) | const |
Returns the TLS model which should be used for the given global variable.
Definition at line 168 of file TargetMachine.cpp.
References llvm::PIELevel::Default, llvm::TLSModel::GeneralDynamic, llvm::GlobalValue::getParent(), llvm::Module::getPIELevel(), getRelocationModel(), getSelectedTLSModel(), llvm::TLSModel::InitialExec, llvm::TLSModel::LocalDynamic, llvm::TLSModel::LocalExec, llvm::Reloc::PIC_, RM, and shouldAssumeDSOLocal().
Referenced by llvm::HexagonTargetLowering::LowerGlobalTLSAddress(), llvm::SparcTargetLowering::LowerGlobalTLSAddress(), llvm::AArch64MCInstLower::lowerSymbolOperandELF(), and memAddrUsesCTR().
|
inline |
Definition at line 187 of file Target/TargetMachine.h.
References llvm::TargetOptions::UniqueSectionNames.
Referenced by selectELFSectionForGlobal().
|
inline |
Test if a DataLayout if compatible with the CodeGen for this target.
The LLVM Module owns a DataLayout that is used for the target independent optimizations and code generation. This hook provides a target specific check on the validity of this DataLayout.
Definition at line 131 of file Target/TargetMachine.h.
References DL.
| bool TargetMachine::isPositionIndependent | ( | ) | const |
Definition at line 59 of file TargetMachine.cpp.
References getRelocationModel(), and llvm::Reloc::PIC_.
Referenced by assureFPCallStub(), computeBasePointerSaveOffset(), llvm::MipsTargetLowering::createFastISel(), createFPFnStub(), fixupFPReturnAndCall(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::PPCRegisterInfo::getBaseRegister(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::TargetLoweringObjectFile::Initialize(), llvm::ARMSubtarget::isGVIndirectSymbol(), llvm::MipsTargetLowering::isJumpTableRelative(), llvm::TargetLoweringBase::isJumpTableRelative(), llvm::AsmPrinter::isPositionIndependent(), llvm::MipsSubtarget::isPositionIndependent(), llvm::X86Subtarget::isPositionIndependent(), llvm::TargetLowering::isPositionIndependent(), and llvm::MipsSubtarget::MipsSubtarget().
|
delete |
|
inline |
Definition at line 157 of file Target/TargetMachine.h.
References RequireStructuredCFG.
Referenced by llvm::TargetPassConfig::addMachineLateOptimization(), and llvm::MachineBasicBlock::canSplitCriticalEdge().
Reset the target options based on the function's attributes.
Definition at line 68 of file TargetMachine.cpp.
References DefaultOptions, llvm::TargetOptions::FPDenormalMode, llvm::Function::getFnAttribute(), llvm::Attribute::getValueAsString(), llvm::FPDenormal::IEEE, Options, llvm::FPDenormal::PositiveZero, llvm::FPDenormal::PreserveSign, and RESET_OPTION.
Referenced by llvm::X86TargetMachine::getSubtargetImpl(), llvm::WebAssemblyTargetMachine::getSubtargetImpl(), llvm::AArch64TargetMachine::getSubtargetImpl(), llvm::SparcTargetMachine::getSubtargetImpl(), llvm::HexagonTargetMachine::getSubtargetImpl(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::ARMBaseTargetMachine::getSubtargetImpl(), llvm::MipsTargetMachine::getSubtargetImpl(), llvm::R600TargetMachine::getSubtargetImpl(), llvm::GCNTargetMachine::getSubtargetImpl(), and llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Definition at line 181 of file Target/TargetMachine.h.
References llvm::TargetOptions::EnableFastISel.
Referenced by addPassesToGenerateCode(), llvm::OptLevelChanger::OptLevelChanger(), and llvm::OptLevelChanger::~OptLevelChanger().
|
inline |
Definition at line 183 of file Target/TargetMachine.h.
References O0WantsFastISel.
Referenced by addPassesToGenerateCode().
| void TargetMachine::setOptLevel | ( | CodeGenOpt::Level | Level | ) |
Overrides the optimization level.
Definition at line 198 of file TargetMachine.cpp.
References OptLevel.
Referenced by llvm::OptLevelChanger::OptLevelChanger(), and llvm::OptLevelChanger::~OptLevelChanger().
|
inline |
Definition at line 158 of file Target/TargetMachine.h.
References RequireStructuredCFG.
Referenced by llvm::R600TargetMachine::R600TargetMachine().
| bool TargetMachine::shouldAssumeDSOLocal | ( | const Module & | M, |
| const GlobalValue * | GV | ||
| ) | const |
Definition at line 121 of file TargetMachine.cpp.
References assert(), llvm::PIELevel::Default, llvm::Reloc::DynamicNoPIC, llvm::Module::getPIELevel(), getRelocationModel(), getTargetTriple(), llvm::GlobalValue::hasDefaultVisibility(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::isDeclarationForLinker(), llvm::Triple::isOSBinFormatCOFF(), llvm::Triple::isOSBinFormatELF(), llvm::Triple::isOSBinFormatMachO(), llvm::Triple::isOSWindows(), llvm::GlobalValue::isStrongDefinitionForLinker(), llvm::GlobalValue::isThreadLocal(), llvm::TargetOptions::MCOptions, llvm::MCTargetOptions::MCPIECopyRelocations, Options, RM, and llvm::Reloc::Static.
Referenced by llvm::X86Subtarget::classifyGlobalFunctionReference(), llvm::AArch64Subtarget::ClassifyGlobalReference(), llvm::X86Subtarget::classifyGlobalReference(), getTLSModel(), llvm::PPCSubtarget::hasLazyResolverStub(), llvm::ARMSubtarget::isGVIndirectSymbol(), llvm::TargetLowering::isOffsetFoldingLegal(), llvm::SystemZSubtarget::isPC32DBLSymbol(), llvm::HexagonTargetLowering::LowerGLOBALADDRESS(), PrepareCall(), and resideInSameSection().
|
inline |
Definition at line 185 of file Target/TargetMachine.h.
References llvm::TargetOptions::PrintMachineCode.
Referenced by llvm::TargetPassConfig::addPrintPass().
|
inlinevirtual |
True if subtarget inserts the final scheduling pass on its own.
Branch relaxation, which must happen after block placement, can on some targets (e.g. SystemZ) expose additional post-RA scheduling opportunities.
Reimplemented in llvm::SystemZTargetMachine.
Definition at line 251 of file Target/TargetMachine.h.
Referenced by llvm::TargetPassConfig::addMachinePasses().
|
inlinevirtual |
True if the target uses physical regs at Prolog/Epilog insertion time.
If true (most machines), all vregs must be allocated before PEI. If false (virtual-register machines), then callee-save register spilling and scavenging are not needed or used.
Reimplemented in llvm::WebAssemblyTargetMachine.
Definition at line 261 of file Target/TargetMachine.h.
Contains target specific asm information.
Definition at line 84 of file Target/TargetMachine.h.
Referenced by getMCAsmInfo(), llvm::LLVMTargetMachine::initAsmInfo(), and ~TargetMachine().
|
protected |
Definition at line 80 of file Target/TargetMachine.h.
Referenced by getCodeModel(), and llvm::LLVMTargetMachine::LLVMTargetMachine().
| const TargetOptions llvm::TargetMachine::DefaultOptions |
Definition at line 94 of file Target/TargetMachine.h.
Referenced by resetTargetOptions().
|
protected |
DataLayout for the target: keep ABI type size and alignment.
The DataLayout is created based on the string representation provided during construction. It is kept here only to avoid reparsing the string but should not really be used during compilation, because it has an internal cache that is context specific.
Definition at line 71 of file Target/TargetMachine.h.
Referenced by createDataLayout(), getPointerSize(), and isCompatibleDataLayout().
|
protected |
Definition at line 87 of file Target/TargetMachine.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), getMCInstrInfo(), llvm::LLVMTargetMachine::initAsmInfo(), and ~TargetMachine().
|
protected |
Definition at line 86 of file Target/TargetMachine.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), getMCRegisterInfo(), llvm::LLVMTargetMachine::initAsmInfo(), and ~TargetMachine().
|
protected |
Definition at line 91 of file Target/TargetMachine.h.
Referenced by getO0WantsFastISel(), and setO0WantsFastISel().
|
mutable |
Definition at line 95 of file Target/TargetMachine.h.
Referenced by llvm::TargetPassConfig::addISelPrepare(), llvm::TargetPassConfig::addMachinePasses(), llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), addPassesToGenerateCode(), llvm::NVPTXTargetLowering::allowFMA(), llvm::ARMTargetLowering::ARMTargetLowering(), canCombineSinCosLibcall(), llvm::AArch64RegisterInfo::cannotEliminateFrame(), llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), combineFMinFMax(), combineSelect(), llvm::MipsTargetLowering::createFastISel(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::PPCFrameLowering::determineCalleeSaves(), llvm::TargetFrameLowering::determineCalleeSaves(), llvm::AsmPrinter::doInitialization(), llvm::DwarfDebug::DwarfDebug(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::X86AsmPrinter::EmitInstruction(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::PPCInstrInfo::getMachineCombinerPatterns(), GetNegatedExpression(), llvm::SelectionDAG::getNode(), llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(), llvm::X86TargetMachine::getSubtargetImpl(), llvm::MipsFrameLowering::hasFP(), llvm::SparcFrameLowering::hasFP(), llvm::SystemZFrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::MSP430FrameLowering::hasFP(), llvm::XCoreFrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), llvm::LLVMTargetMachine::initAsmInfo(), llvm::HexagonTargetObjectFile::Initialize(), llvm::WebAssemblyTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), llvm::AArch64InstrInfo::isAssociativeAndCommutative(), llvm::X86InstrInfo::isAssociativeAndCommutative(), isCombineInstrCandidateFP(), isFMAddSub(), llvm::isInTailCallPosition(), llvm::AArch64TargetLowering::isProfitableToHoist(), llvm::SelectionDAGBuilder::LowerDeoptimizingReturn(), llvm::SparcTargetLowering::LowerGlobalTLSAddress(), lowerUINT_TO_FP_vXi32(), llvm::PPCFrameLowering::needsFP(), llvm::OptLevelChanger::OptLevelChanger(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), promoteToConstantPool(), resetTargetOptions(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::FastISel::selectOperator(), shouldAssumeDSOLocal(), llvm::ARMSubtarget::splitFramePushPop(), llvm::TargetPassConfig::TargetPassConfig(), llvm::DwarfCompileUnit::updateSubprogramScopeDIE(), llvm::ARMSubtarget::useFastISel(), and llvm::X86TargetLowering::X86TargetLowering().
|
protected |
Definition at line 81 of file Target/TargetMachine.h.
Referenced by getOptLevel(), llvm::LLVMTargetMachine::LLVMTargetMachine(), and setOptLevel().
|
protected |
Definition at line 90 of file Target/TargetMachine.h.
Referenced by requiresStructuredCFG(), and setRequiresStructuredCFG().
|
protected |
Definition at line 79 of file Target/TargetMachine.h.
Referenced by getRelocationModel(), getTLSModel(), llvm::LLVMTargetMachine::LLVMTargetMachine(), and shouldAssumeDSOLocal().
|
protected |
Definition at line 88 of file Target/TargetMachine.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), getMCSubtargetInfo(), llvm::LLVMTargetMachine::initAsmInfo(), and ~TargetMachine().
|
protected |
Definition at line 76 of file Target/TargetMachine.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::X86TargetMachine::getSubtargetImpl(), llvm::WebAssemblyTargetMachine::getSubtargetImpl(), llvm::SparcTargetMachine::getSubtargetImpl(), llvm::AArch64TargetMachine::getSubtargetImpl(), llvm::HexagonTargetMachine::getSubtargetImpl(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::ARMBaseTargetMachine::getSubtargetImpl(), llvm::MipsTargetMachine::getSubtargetImpl(), and getTargetCPU().
|
protected |
Definition at line 77 of file Target/TargetMachine.h.
Referenced by llvm::X86TargetMachine::getSubtargetImpl(), llvm::AArch64TargetMachine::getSubtargetImpl(), llvm::WebAssemblyTargetMachine::getSubtargetImpl(), llvm::HexagonTargetMachine::getSubtargetImpl(), llvm::SparcTargetMachine::getSubtargetImpl(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::ARMBaseTargetMachine::getSubtargetImpl(), llvm::MipsTargetMachine::getSubtargetImpl(), and getTargetFeatureString().
|
protected |
Triple string, CPU name, and target feature strings the TargetMachine instance is created with.
Definition at line 75 of file Target/TargetMachine.h.
Referenced by llvm::X86TargetMachine::getSubtargetImpl(), llvm::WebAssemblyTargetMachine::getSubtargetImpl(), llvm::AArch64TargetMachine::getSubtargetImpl(), llvm::SparcTargetMachine::getSubtargetImpl(), llvm::HexagonTargetMachine::getSubtargetImpl(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::ARMBaseTargetMachine::getSubtargetImpl(), llvm::MipsTargetMachine::getSubtargetImpl(), llvm::R600TargetMachine::getSubtargetImpl(), llvm::GCNTargetMachine::getSubtargetImpl(), and getTargetTriple().
The Target that this machine was created for.
Definition at line 63 of file Target/TargetMachine.h.
Referenced by getTarget(), and llvm::LLVMTargetMachine::initAsmInfo().
1.8.6