LLVM API Documentation

llvm::TargetLoweringObjectFile Class Reference

#include <TargetLoweringObjectFile.h>

Inheritance diagram for llvm::TargetLoweringObjectFile:
[legend]
Collaboration diagram for llvm::TargetLoweringObjectFile:
[legend]

List of all members.

Public Member Functions

MCContext & getContext () const
virtual ~TargetLoweringObjectFile ()
virtual void Initialize (MCContext &ctx, const TargetMachine &TM)
const MCSection * getTextSection () const
const MCSection * getDataSection () const
const MCSection * getBSSSection () const
const MCSection * getStaticCtorSection () const
const MCSection * getStaticDtorSection () const
const MCSection * getLSDASection () const
const MCSection * getEHFrameSection () const
const MCSection * getDwarfAbbrevSection () const
const MCSection * getDwarfInfoSection () const
const MCSection * getDwarfLineSection () const
const MCSection * getDwarfFrameSection () const
const MCSection * getDwarfPubNamesSection () const
const MCSection * getDwarfPubTypesSection () const
const MCSection * getDwarfDebugInlineSection () const
const MCSection * getDwarfStrSection () const
const MCSection * getDwarfLocSection () const
const MCSection * getDwarfARangesSection () const
const MCSection * getDwarfRangesSection () const
const MCSection * getDwarfMacroInfoSection () const
virtual bool shouldEmitUsedDirectiveFor (const GlobalValue *GV, Mangler *) const
virtual const MCSection * getSectionForConstant (SectionKind Kind) const
const MCSection * SectionForGlobal (const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const
const MCSection * SectionForGlobal (const GlobalValue *GV, Mangler *Mang, const TargetMachine &TM) const
virtual const MCSection * getExplicitSectionGlobal (const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const =0
virtual const MCSection * getSpecialCasedSectionGlobals (const GlobalValue *GV, Mangler *Mang, SectionKind Kind) const

Static Public Member Functions

static SectionKind getKindForGlobal (const GlobalValue *GV, const TargetMachine &TM)

Protected Member Functions

 TargetLoweringObjectFile ()
virtual const MCSection * SelectSectionForGlobal (const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const

Protected Attributes

const MCSection * TextSection
const MCSection * DataSection
const MCSection * BSSSection
 BSSSection - Section that is default initialized to zero.
const MCSection * ReadOnlySection
const MCSection * StaticCtorSection
const MCSection * StaticDtorSection
const MCSection * LSDASection
const MCSection * EHFrameSection
const MCSection * DwarfAbbrevSection
const MCSection * DwarfInfoSection
const MCSection * DwarfLineSection
const MCSection * DwarfFrameSection
const MCSection * DwarfPubNamesSection
const MCSection * DwarfPubTypesSection
const MCSection * DwarfDebugInlineSection
const MCSection * DwarfStrSection
const MCSection * DwarfLocSection
const MCSection * DwarfARangesSection
const MCSection * DwarfRangesSection
const MCSection * DwarfMacroInfoSection


Detailed Description

Definition at line 30 of file TargetLoweringObjectFile.h.


Constructor & Destructor Documentation

TargetLoweringObjectFile::TargetLoweringObjectFile (  )  [protected]

TargetLoweringObjectFile::~TargetLoweringObjectFile (  )  [virtual]

Definition at line 59 of file TargetLoweringObjectFile.cpp.


Member Function Documentation

MCContext& llvm::TargetLoweringObjectFile::getContext (  )  const [inline]

virtual void llvm::TargetLoweringObjectFile::Initialize ( MCContext &  ctx,
const TargetMachine &  TM 
) [inline, 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::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, llvm::PIC16TargetObjectFile, and llvm::XCoreTargetObjectFile.

Definition at line 97 of file TargetLoweringObjectFile.h.

Referenced by llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), and llvm::PIC16TargetObjectFile::Initialize().

const MCSection* llvm::TargetLoweringObjectFile::getTextSection (  )  const [inline]

const MCSection* llvm::TargetLoweringObjectFile::getDataSection (  )  const [inline]

const MCSection* llvm::TargetLoweringObjectFile::getBSSSection (  )  const [inline]

Definition at line 104 of file TargetLoweringObjectFile.h.

References BSSSection.

const MCSection* llvm::TargetLoweringObjectFile::getStaticCtorSection (  )  const [inline]

Definition at line 105 of file TargetLoweringObjectFile.h.

References StaticCtorSection.

const MCSection* llvm::TargetLoweringObjectFile::getStaticDtorSection (  )  const [inline]

Definition at line 106 of file TargetLoweringObjectFile.h.

References StaticDtorSection.

const MCSection* llvm::TargetLoweringObjectFile::getLSDASection (  )  const [inline]

Definition at line 107 of file TargetLoweringObjectFile.h.

References LSDASection.

const MCSection* llvm::TargetLoweringObjectFile::getEHFrameSection (  )  const [inline]

Definition at line 108 of file TargetLoweringObjectFile.h.

References EHFrameSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfAbbrevSection (  )  const [inline]

Definition at line 109 of file TargetLoweringObjectFile.h.

References DwarfAbbrevSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfInfoSection (  )  const [inline]

Definition at line 110 of file TargetLoweringObjectFile.h.

References DwarfInfoSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfLineSection (  )  const [inline]

Definition at line 111 of file TargetLoweringObjectFile.h.

References DwarfLineSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfFrameSection (  )  const [inline]

Definition at line 112 of file TargetLoweringObjectFile.h.

References DwarfFrameSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfPubNamesSection (  )  const [inline]

Definition at line 113 of file TargetLoweringObjectFile.h.

References DwarfPubNamesSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfPubTypesSection (  )  const [inline]

Definition at line 114 of file TargetLoweringObjectFile.h.

References DwarfPubTypesSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfDebugInlineSection (  )  const [inline]

Definition at line 115 of file TargetLoweringObjectFile.h.

References DwarfDebugInlineSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfStrSection (  )  const [inline]

Definition at line 118 of file TargetLoweringObjectFile.h.

References DwarfStrSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfLocSection (  )  const [inline]

Definition at line 119 of file TargetLoweringObjectFile.h.

References DwarfLocSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfARangesSection (  )  const [inline]

Definition at line 120 of file TargetLoweringObjectFile.h.

References DwarfARangesSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfRangesSection (  )  const [inline]

Definition at line 121 of file TargetLoweringObjectFile.h.

References DwarfRangesSection.

const MCSection* llvm::TargetLoweringObjectFile::getDwarfMacroInfoSection (  )  const [inline]

Definition at line 122 of file TargetLoweringObjectFile.h.

References DwarfMacroInfoSection.

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 129 of file TargetLoweringObjectFile.h.

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::TargetLoweringObjectFileELF, and llvm::TargetLoweringObjectFileMachO.

Definition at line 271 of file TargetLoweringObjectFile.cpp.

References DataSection, llvm::SectionKind::isReadOnly(), and ReadOnlySection.

Referenced by llvm::AsmPrinter::EmitConstantPool(), and llvm::AsmPrinter::EmitJumpTableInfo().

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 121 of file TargetLoweringObjectFile.cpp.

References llvm::CallingConv::C, llvm::dyn_cast(), llvm::SectionKind::getBSS(), 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::TargetMachine::getTargetData(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadData(), llvm::Value::getType(), llvm::TargetData::getTypeAllocSize(), llvm::Constant::GlobalRelocations, llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDeclaration(), IsNullTerminatedString(), isSuitableForBSS(), llvm::GlobalVariable::isThreadLocal(), llvm_unreachable, llvm::Constant::LocalRelocation, llvm::Constant::NoRelocation, and llvm::Reloc::Static.

Referenced by llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), and SectionForGlobal().

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.

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 235 of file TargetLoweringObjectFile.cpp.

References getExplicitSectionGlobal(), llvm::GlobalValue::hasSection(), and SelectSectionForGlobal().

Referenced by llvm::PIC16AsmPrinter::doInitialization(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), 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 153 of file TargetLoweringObjectFile.h.

References getKindForGlobal(), and SectionForGlobal().

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::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, and llvm::PIC16TargetObjectFile.

Referenced by SectionForGlobal().

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 171 of file TargetLoweringObjectFile.h.

const MCSection * TargetLoweringObjectFile::SelectSectionForGlobal ( const GlobalValue *  GV,
SectionKind  Kind,
Mangler *  Mang,
const TargetMachine &  TM 
) const [protected, virtual]


Member Data Documentation

LSDASection - If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to.

Definition at line 66 of file TargetLoweringObjectFile.h.

Referenced by getLSDASection(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileCOFF::Initialize(), and TargetLoweringObjectFile().

EHFrameSection - If exception handling is supported by the target, this is the section the EH Frame is emitted to.

Definition at line 70 of file TargetLoweringObjectFile.h.

Referenced by getEHFrameSection(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), and TargetLoweringObjectFile().


The documentation for this class was generated from the following files: