LLVM API Documentation
#include <TargetLoweringObjectFile.h>


Definition at line 35 of file TargetLoweringObjectFile.h.
| llvm::TargetLoweringObjectFile::TargetLoweringObjectFile | ( | ) | [inline] |
Definition at line 45 of file TargetLoweringObjectFile.h.
| TargetLoweringObjectFile::~TargetLoweringObjectFile | ( | ) | [virtual] |
Definition at line 47 of file TargetLoweringObjectFile.cpp.
| virtual void llvm::TargetLoweringObjectFile::emitModuleFlags | ( | MCStreamer & | , |
| ArrayRef< Module::ModuleFlagEntry > | , | ||
| Mangler * | , | ||
| const TargetMachine & | |||
| ) | const [inline, virtual] |
emitModuleFlags - Emit the module flags that the platform cares about.
Reimplemented in llvm::TargetLoweringObjectFileCOFF, and llvm::TargetLoweringObjectFileMachO.
Definition at line 59 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::doFinalization().
| void TargetLoweringObjectFile::emitPersonalityValue | ( | MCStreamer & | Streamer, |
| const TargetMachine & | TM, | ||
| const MCSymbol * | Sym | ||
| ) | const [virtual] |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 106 of file TargetLoweringObjectFile.cpp.
Referenced by llvm::DwarfCFIException::EndModule().
| MCSymbol * TargetLoweringObjectFile::getCFIPersonalitySymbol | ( | const GlobalValue * | GV, |
| Mangler * | Mang, | ||
| MachineModuleInfo * | MMI | ||
| ) | const [virtual] |
Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileELF, and llvm::X86_64MachoTargetObjectFile.
Definition at line 101 of file TargetLoweringObjectFile.cpp.
References llvm::Mangler::getSymbol().
Referenced by llvm::DwarfCFIException::BeginFunction(), and llvm::Win64Exception::EndFunction().
| MCContext& llvm::TargetLoweringObjectFile::getContext | ( | ) | const [inline] |
Definition at line 43 of file TargetLoweringObjectFile.h.
Referenced by getTTypeGlobalReference(), getTTypeReference(), llvm::HexagonTargetObjectFile::Initialize(), llvm::MBlazeTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
| virtual const MCSection* llvm::TargetLoweringObjectFile::getExplicitSectionGlobal | ( | const GlobalValue * | GV, |
| SectionKind | Kind, | ||
| Mangler * | Mang, | ||
| const TargetMachine & | TM | ||
| ) | const [pure virtual] |
getExplicitSectionGlobal - Targets should implement this method to assign a section to globals with an explicit section specfied. The implementation of this method can assume that GV->hasSection() is true.
Implemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileMachO, llvm::NVPTXTargetObjectFile, and llvm::TargetLoweringObjectFileELF.
Referenced by SectionForGlobal().
| SectionKind TargetLoweringObjectFile::getKindForGlobal | ( | const GlobalValue * | GV, |
| const TargetMachine & | TM | ||
| ) | [static] |
getKindForGlobal - Classify the specified global variable into a set of target independent categories embodied in SectionKind.
getKindForGlobal - This is a top-level target-independent classifier for a global variable. Given an global variable and information from TM, it classifies the global in a variety of ways that make various target implementations simpler. The target implementation is free to ignore this extra info of course.
Definition at line 117 of file TargetLoweringObjectFile.cpp.
References llvm::CallingConv::C, llvm::dyn_cast(), llvm::SectionKind::getBSS(), llvm::SectionKind::getBSSExtern(), llvm::SectionKind::getBSSLocal(), llvm::SectionKind::getCommon(), llvm::TargetMachine::getDataLayout(), llvm::SectionKind::getDataNoRel(), llvm::SectionKind::getDataRel(), llvm::SectionKind::getDataRelLocal(), llvm::GlobalVariable::getInitializer(), llvm::SectionKind::getMergeable1ByteCString(), llvm::SectionKind::getMergeable2ByteCString(), llvm::SectionKind::getMergeable4ByteCString(), llvm::SectionKind::getMergeableConst(), llvm::SectionKind::getMergeableConst16(), llvm::SectionKind::getMergeableConst4(), llvm::SectionKind::getMergeableConst8(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getReadOnlyWithRel(), llvm::SectionKind::getReadOnlyWithRelLocal(), llvm::Constant::getRelocationInfo(), llvm::TargetMachine::getRelocationModel(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadData(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::Constant::GlobalRelocations, llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::hasUnnamedAddr(), llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDeclaration(), IsNullTerminatedString(), isSuitableForBSS(), llvm::GlobalVariable::isThreadLocal(), llvm_unreachable, llvm::Constant::LocalRelocation, llvm::Constant::NoRelocation, llvm::TargetOptions::NoZerosInBSS, llvm::TargetMachine::Options, and llvm::Reloc::Static.
Referenced by llvm::AsmPrinter::EmitGlobalVariable(), llvm::HexagonTargetObjectFile::IsGlobalInSmallSection(), llvm::MBlazeTargetObjectFile::IsGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), and SectionForGlobal().
| const MCSection * TargetLoweringObjectFile::getSectionForConstant | ( | SectionKind | Kind | ) | const [virtual] |
getSectionForConstant - Given a constant with the SectionKind, return a section that it should be placed in.
getSectionForConstant - Given a mergable constant with the specified size and relocation information, return a section that it should be placed in.
Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::NVPTXTargetObjectFile, and llvm::TargetLoweringObjectFileELF.
Definition at line 281 of file TargetLoweringObjectFile.cpp.
References llvm::MCObjectFileInfo::DataSection, llvm::SectionKind::isReadOnly(), and llvm::MCObjectFileInfo::ReadOnlySection.
Referenced by llvm::AsmPrinter::EmitConstantPool(), and llvm::AsmPrinter::EmitJumpTableInfo().
| virtual const MCSection* llvm::TargetLoweringObjectFile::getSpecialCasedSectionGlobals | ( | const GlobalValue * | GV, |
| Mangler * | Mang, | ||
| SectionKind | Kind | ||
| ) | const [inline, virtual] |
getSpecialCasedSectionGlobals - Allow the target to completely override section assignment of a global.
Definition at line 107 of file TargetLoweringObjectFile.h.
| virtual const MCSection* llvm::TargetLoweringObjectFile::getStaticCtorSection | ( | unsigned | Priority = 65535 | ) | const [inline, virtual] |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 131 of file TargetLoweringObjectFile.h.
References llvm::MCObjectFileInfo::StaticCtorSection.
| virtual const MCSection* llvm::TargetLoweringObjectFile::getStaticDtorSection | ( | unsigned | Priority = 65535 | ) | const [inline, virtual] |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 136 of file TargetLoweringObjectFile.h.
References llvm::MCObjectFileInfo::StaticDtorSection.
| const MCExpr * TargetLoweringObjectFile::getTTypeGlobalReference | ( | const GlobalValue * | GV, |
| Mangler * | Mang, | ||
| MachineModuleInfo * | MMI, | ||
| unsigned | Encoding, | ||
| MCStreamer & | Streamer | ||
| ) | const [virtual] |
getTTypeGlobalReference - Return an MCExpr to use for a reference to the specified global variable from exception handling information.
Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileELF, llvm::ARMElfTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 292 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::Create(), getContext(), llvm::Mangler::getSymbol(), and getTTypeReference().
Referenced by llvm::AsmPrinter::EmitTTypeReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
| const MCExpr * TargetLoweringObjectFile::getTTypeReference | ( | const MCSymbolRefExpr * | Sym, |
| unsigned | Encoding, | ||
| MCStreamer & | Streamer | ||
| ) | const |
Definition at line 302 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::MCBinaryExpr::CreateSub(), llvm::MCContext::CreateTempSymbol(), llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_pcrel, llvm::MCStreamer::EmitLabel(), getContext(), and llvm::report_fatal_error().
Referenced by llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and getTTypeGlobalReference().
| void TargetLoweringObjectFile::Initialize | ( | MCContext & | ctx, |
| const TargetMachine & | TM | ||
| ) | [virtual] |
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 in llvm::NVPTXTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::MBlazeTargetObjectFile, and llvm::XCoreTargetObjectFile.
Definition at line 40 of file TargetLoweringObjectFile.cpp.
References llvm::TargetMachine::getCodeModel(), llvm::TargetMachine::getRelocationModel(), llvm::TargetMachine::getTargetTriple(), and llvm::MCObjectFileInfo::InitMCObjectFileInfo().
Referenced by llvm::ARMElfTargetObjectFile::Initialize().
| const MCSection * TargetLoweringObjectFile::SectionForGlobal | ( | const GlobalValue * | GV, |
| SectionKind | Kind, | ||
| Mangler * | Mang, | ||
| const TargetMachine & | TM | ||
| ) | const |
SectionForGlobal - This method computes the appropriate section to emit the specified global variable or function definition. This should not be passed external (or available externally) globals.
Definition at line 245 of file TargetLoweringObjectFile.cpp.
References getExplicitSectionGlobal(), llvm::GlobalValue::hasSection(), and SelectSectionForGlobal().
Referenced by llvm::AsmPrinter::EmitGlobalVariable(), llvm::ARMAsmPrinter::EmitStartOfAsmFile(), and SectionForGlobal().
| const MCSection* llvm::TargetLoweringObjectFile::SectionForGlobal | ( | const GlobalValue * | GV, |
| Mangler * | Mang, | ||
| const TargetMachine & | TM | ||
| ) | const [inline] |
SectionForGlobal - This method computes the appropriate section to emit the specified global variable or function definition. This should not be passed external (or available externally) globals.
Definition at line 91 of file TargetLoweringObjectFile.h.
References getKindForGlobal(), and SectionForGlobal().
| const MCSection * TargetLoweringObjectFile::SelectSectionForGlobal | ( | const GlobalValue * | GV, |
| SectionKind | Kind, | ||
| Mangler * | Mang, | ||
| const TargetMachine & | TM | ||
| ) | const [protected, virtual] |
Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileELF, llvm::HexagonTargetObjectFile, llvm::MBlazeTargetObjectFile, and llvm::MipsTargetObjectFile.
Definition at line 259 of file TargetLoweringObjectFile.cpp.
References llvm::MCObjectFileInfo::BSSSection, llvm::MCObjectFileInfo::getDataSection(), llvm::MCObjectFileInfo::getTextSection(), llvm::SectionKind::isBSS(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadLocal(), and llvm::MCObjectFileInfo::ReadOnlySection.
Referenced by SectionForGlobal().
| virtual bool llvm::TargetLoweringObjectFile::shouldEmitUsedDirectiveFor | ( | const GlobalValue * | GV, |
| Mangler * | |||
| ) | const [inline, virtual] |
shouldEmitUsedDirectiveFor - This hook allows targets to selectively decide not to emit the UsedDirective for some symbols in llvm.used. FIXME: REMOVE this (rdar://7071300)
Reimplemented in llvm::TargetLoweringObjectFileMachO.
Definition at line 67 of file TargetLoweringObjectFile.h.