LLVM
8.0.1
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Additional Inherited Members | |
Public Types inherited from llvm::MCObjectFileInfo | |
enum | Environment { IsMachO, IsELF, IsCOFF, IsWasm } |
Static Public Member Functions inherited from llvm::TargetLoweringObjectFile | |
static SectionKind | getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM) |
Classify the specified global variable into a set of target independent categories embodied in SectionKind. More... | |
Definition at line 32 of file TargetLoweringObjectFileImpl.h.
|
default |
|
overridedefault |
|
overridevirtual |
Emit Obj-C garbage collection and linker options.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 255 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCStreamer::AddBlankLine(), C, llvm::MCSymbolRefExpr::create(), E, llvm::MCStreamer::EmitBytes(), llvm::MCStreamer::emitCGProfileEntry(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::StringRef::empty(), F(), From, llvm::Module::getModuleFlagsMetadata(), llvm::Module::getNamedMetadata(), GetObjCImageInfo(), llvm::MDNode::getOperand(), llvm::MDNode::operands(), llvm::report_fatal_error(), llvm::ARMBuildAttrs::Section, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_EXCLUDE, llvm::ELF::SHT_LLVM_LINKER_OPTIONS, llvm::ELF::SHT_PROGBITS, llvm::MCStreamer::SwitchSection(), llvm::SystemZISD::TM, llvm::IndexedInstrProf::Version, and llvm::MCSymbolRefExpr::VK_None.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 343 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCConstantExpr::create(), E, llvm::MCStreamer::emitELFSize(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitSymbolAttribute(), llvm::MCStreamer::EmitSymbolValue(), llvm::MCStreamer::EmitValueToAlignment(), llvm::MCSymbol::getName(), llvm::DataLayout::getPointerABIAlignment(), llvm::DataLayout::getPointerSize(), llvm::MCSA_ELF_TypeObject, llvm::MCSA_Hidden, llvm::MCSA_Weak, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, Size, and llvm::MCStreamer::SwitchSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 331 of file TargetLoweringObjectFileImpl.cpp.
References llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_indirect, llvm::MCSymbol::getName(), llvm::TargetMachine::getSymbol(), and llvm::report_fatal_error().
|
overridevirtual |
Targets should implement this method to assign a section to globals with an explicit section specfied.
The implementation of this method can assume that GO->hasSection() is true.
Implements llvm::TargetLoweringObjectFile.
Reimplemented in llvm::ARMElfTargetObjectFile, llvm::AMDGPUTargetObjectFile, llvm::XCoreTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 533 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, C, llvm::dyn_cast(), F(), llvm::MCContext::GenericSectionID, llvm::MCSectionELF::getAssociatedSymbol(), getAssociatedSymbol(), llvm::GlobalVariable::getAttributes(), getELFComdat(), getELFKindForNamedSection(), getELFSectionFlags(), getELFSectionType(), getEntrySizeForKind(), llvm::Function::getFnAttribute(), llvm::Value::getName(), llvm::GlobalObject::getSection(), llvm::Attribute::getValueAsString(), llvm::Function::hasFnAttribute(), llvm::GlobalVariable::hasImplicitSection(), llvm::SectionKind::isBSS(), llvm::SectionKind::isData(), llvm::SectionKind::isReadOnly(), llvm::ARMBuildAttrs::Section, llvm::ELF::SHF_GROUP, and llvm::ELF::SHF_LINK_ORDER.
Referenced by llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::AMDGPUTargetObjectFile::getExplicitSectionGlobal(), and llvm::ARMElfTargetObjectFile::getExplicitSectionGlobal().
|
overridevirtual |
If supported, return the section to use for the llvm.commandline metadata.
Otherwise, return nullptr.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 798 of file TargetLoweringObjectFileImpl.cpp.
References llvm::ELF::SHF_MERGE, llvm::ELF::SHF_STRINGS, and llvm::ELF::SHT_PROGBITS.
|
overridevirtual |
Given a constant with the SectionKind, return a section that it should be placed in.
Given a mergeable constant with the specified size and relocation information, return a section that it should be placed in.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, and llvm::XCoreTargetObjectFile.
Definition at line 710 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst32(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), and llvm::SectionKind::isReadOnlyWithRel().
Referenced by llvm::LanaiTargetObjectFile::getSectionForConstant(), and llvm::MipsTargetObjectFile::getSectionForConstant().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 686 of file TargetLoweringObjectFileImpl.cpp.
References C, llvm::GlobalObject::getComdat(), llvm::TargetMachine::getFunctionSections(), llvm::SectionKind::getReadOnly(), selectELFSectionForGlobal(), and llvm::ELF::SHF_ALLOC.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 766 of file TargetLoweringObjectFileImpl.cpp.
References getStaticStructorSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 772 of file TargetLoweringObjectFileImpl.cpp.
References getStaticStructorSection().
|
overridevirtual |
Return an MCExpr to use for a reference to the specified type info global variable from exception handling information.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::SparcELFTargetObjectFile, and llvm::ARMElfTargetObjectFile.
Definition at line 365 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::dwarf::DW_EH_PE_indirect, llvm::MachineModuleInfoELF::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), and llvm::GlobalValue::hasLocalLinkage().
Referenced by llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), and llvm::SparcELFTargetObjectFile::getTTypeGlobalReference().
|
overridevirtual |
This method must be called before any actual lowering is done.
Initialize - this method must be called before any actual lowering is done.
This specifies the current context for codegen, and gives the lowering implementations a chance to set up their default sections.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::XCoreTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::AVRTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 94 of file TargetLoweringObjectFileImpl.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::ARM, llvm::Triple::arm, llvm::Triple::armeb, llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_pcrel, llvm::dwarf::DW_EH_PE_sdata4, llvm::dwarf::DW_EH_PE_sdata8, llvm::dwarf::DW_EH_PE_udata4, llvm::dwarf::DW_EH_PE_udata8, llvm::Triple::getArch(), llvm::MCContext::getAsmInfo(), llvm::TargetMachine::getCodeModel(), llvm::MCAsmInfo::getExceptionHandlingType(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::hexagon, llvm::TargetLoweringObjectFile::Initialize(), llvm::Triple::isOSFreeBSD(), llvm::Triple::lanai, LLVM_FALLTHROUGH, llvm::CodeModel::Medium, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::CodeModel::Small, llvm::Triple::sparc, llvm::Triple::sparcel, llvm::Triple::sparcv9, llvm::Triple::systemz, llvm::Triple::thumb, llvm::Triple::thumbeb, llvm::SystemZISD::TM, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::X86ELFTargetObjectFile::getDebugThreadLocalSymbol(), llvm::HexagonTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), and llvm::MipsTargetObjectFile::Initialize().
void TargetLoweringObjectFileELF::InitializeELF | ( | bool | UseInitArray_ | ) |
Definition at line 807 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCContext::getELFSection(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_FINI_ARRAY, llvm::ELF::SHT_INIT_ARRAY, and llvm::ELF::SHT_PROGBITS.
Referenced by llvm::HexagonTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), and llvm::MipsTargetObjectFile::Initialize().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 778 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::Type::getPointerAddressSpace(), llvm::TargetMachine::getSymbol(), llvm::GlobalValue::getType(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::hasGlobalUnnamedAddr(), llvm::Type::isFunctionTy(), and llvm::GlobalValue::isThreadLocal().
|
overridevirtual |
Implements llvm::TargetLoweringObjectFile.
Reimplemented in llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::XCoreTargetObjectFile, llvm::AMDGPUTargetObjectFile, llvm::AVRTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 658 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::MCSectionELF::getAssociatedSymbol(), getAssociatedSymbol(), llvm::TargetMachine::getDataSections(), getELFSectionFlags(), llvm::TargetMachine::getFunctionSections(), llvm::GlobalObject::hasComdat(), llvm::SectionKind::isCommon(), llvm::SectionKind::isText(), llvm::ARMBuildAttrs::Section, selectELFSectionForGlobal(), llvm::ELF::SHF_LINK_ORDER, and llvm::ELF::SHF_MERGE.
Referenced by llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), llvm::LanaiTargetObjectFile::SelectSectionForGlobal(), llvm::MipsTargetObjectFile::SelectSectionForGlobal(), llvm::ARMElfTargetObjectFile::SelectSectionForGlobal(), and llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::HexagonTargetObjectFile.
Definition at line 701 of file TargetLoweringObjectFileImpl.cpp.
|
protected |
Definition at line 37 of file TargetLoweringObjectFileImpl.h.
Referenced by llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile().
|
protected |
Definition at line 39 of file TargetLoweringObjectFileImpl.h.
Referenced by llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection(), and llvm::SparcELFTargetObjectFile::SparcELFTargetObjectFile().