LLVM: include/llvm/Target/TargetLoweringObjectFile.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H

15#define LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H

16

19#include

20

21namespace llvm {

22

25class DataLayout;

27class GlobalObject;

28class GlobalValue;

29class MachineBasicBlock;

30class MachineModuleInfo;

31class Mangler;

32class MCContext;

33class MCExpr;

34class MCSection;

36class MCSymbolRefExpr;

37class MCStreamer;

38class MCValue;

40class SectionKind;

41class StringRef;

42class TargetMachine;

43class DSOLocalEquivalent;

44

46

48

49protected:

54

55

56

61

62

64

65

67

69

70public:

76

78

79

80

81

83

87

88

90

91

93

94

96

97

99

100

101

104 Align &Alignment) const;

105

110

114

115

116

119

120

121

122

125

126

127

128

131

135

141 }

142

145

146

147

148

152

153

154

156 unsigned Encoding,

160

161

162

166

167

171

176

179

181 const MCSymbol *KeySym) const {

183 }

184

186 const MCSymbol *KeySym) const {

188 }

189

190

191

193

197 return nullptr;

198 }

199

200

201

204 }

205

208 return nullptr;

209 }

210

211

212

215 }

216

217

218

221 }

222

223

226 }

227

228

230

231

233 return nullptr;

234 }

235

236

243 return nullptr;

244 }

245

246

247

249 return nullptr;

250 }

251

252

253

257 return nullptr;

258 }

259

260

261

262

265 return nullptr;

266 }

267

268

269

273 return nullptr;

274 }

275

276

277

280 return nullptr;

281 }

282

283

284

285

288 return nullptr;

289 }

290

291protected:

295};

296

297}

298

299#endif

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

Machine Check Debug Module

This is an important base class in LLVM.

Wrapper for a function that represents a value that functionally represents the original function.

A parsed version of the target data layout string in and methods for querying it.

Context object for machine code objects.

Base class for the full range of assembler expressions which are needed for parsing.

MCSection * LSDASection

If exception handling is supported by the target, this is the section the Language Specific Data Area...

Wrapper class representing physical registers. Should be passed by value.

static constexpr unsigned NoRegister

Instances of this class represent a uniqued identifier for a section in the current translation unit.

Streaming machine code generation interface.

Represent a reference to a symbol from inside an expression.

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

This represents an "assembler immediate".

This class contains meta information specific to a module.

A Module instance is used to store all the information related to an LLVM module.

SectionKind - This is a simple POD value that classifies the properties of a section.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

StringRef - Represent a constant reference to a string, i.e.

void emitCGProfileMetadata(MCStreamer &Streamer, Module &M) const

Emit Call Graph Profile metadata.

virtual void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const

MCSection * StaticDtorSection

This section contains the static destructor pointer list.

virtual MCRegister getStaticBase() const

Returns the register used as static base in RWPI variants.

virtual MCSection * getSectionForCommandLines() const

If supported, return the section to use for the llvm.commandline metadata.

unsigned PersonalityEncoding

PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.

bool SupportGOTPCRelWithOffset

Mangler & getMangler() const

unsigned getCallSiteEncoding() const

bool SupportIndirectSymViaGOTPCRel

static SectionKind getKindForGlobal(const GlobalObject *GO, const TargetMachine &TM)

Classify the specified global variable into a set of target independent categories embodied in Sectio...

virtual MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const

virtual MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const

virtual bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const

virtual const MCExpr * getIndirectSymViaGOTPCRel(const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const

Get the target specific PC relative GOT entry relocation.

bool SupportDebugThreadLocalLocation

TargetLoweringObjectFile & operator=(const TargetLoweringObjectFile &)=delete

virtual void emitModuleMetadata(MCStreamer &Streamer, Module &M) const

Emit the module-level metadata that the platform cares about.

unsigned getLSDAEncoding() const

virtual MCSection * getSectionForExternalReference(const GlobalObject *GO, const TargetMachine &TM) const

On targets that associate external references with a section, return such a section for the given ext...

virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const

bool supportDSOLocalEquivalentLowering() const

Target supports a native lowering of a dso_local_equivalent constant without needing to replace it wi...

unsigned getTTypeEncoding() const

virtual void Initialize(MCContext &ctx, const TargetMachine &TM)

This method must be called before any actual lowering is done.

virtual void getModuleMetadata(Module &M)

Get the module-level metadata that the platform cares about.

unsigned getPersonalityEncoding() const

bool supportDebugThreadLocalLocation() const

Target supports TLS offset relocation in debug section?

MCSection * StaticCtorSection

This section contains the static constructor pointer list.

virtual MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0

bool SupportDSOLocalEquivalentLowering

virtual const MCExpr * getIndirectSymViaRWPI(const MCSymbol *Sym) const

Get the target specific RWPI relocation.

virtual MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const

Given a constant with the SectionKind, return a section that it should be placed in.

MCSymbol * getSymbolWithGlobalValueBase(const GlobalValue *GV, StringRef Suffix, const TargetMachine &TM) const

Return the MCSymbol for a private symbol with global value name as its base, with the specified suffi...

virtual MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const

virtual const MCExpr * lowerDSOLocalEquivalent(const DSOLocalEquivalent *Equiv, const TargetMachine &TM) const

virtual MCSection * getSectionForMachineBasicBlock(const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const

virtual MCSection * getSectionForTOCEntry(const MCSymbol *S, const TargetMachine &TM) const

On targets that support TOC entries, return a section for the entry given the symbol it refers to.

bool supportGOTPCRelWithOffset() const

Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?

virtual ~TargetLoweringObjectFile()

virtual const MCExpr * getDebugThreadLocalSymbol(const MCSymbol *Sym) const

Create a symbol reference to describe the given TLS variable when emitting the address in debug info.

virtual MCSection * getSectionForLSDA(const Function &, const MCSymbol &, const TargetMachine &) const

bool supportIndirectSymViaGOTPCRel() const

Target supports replacing a data "PC"-relative access to a symbol through another symbol,...

virtual const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const

Return an MCExpr to use for a reference to the specified global variable from exception handling info...

unsigned CallSiteEncoding

virtual MCSection * getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0

Targets should implement this method to assign a section to globals with an explicit section specfied...

TargetLoweringObjectFile()=default

const MCExpr * getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const

virtual MCSymbol * getFunctionEntryPointSymbol(const GlobalValue *Func, const TargetMachine &TM) const

If supported, return the function entry point symbol.

virtual MCSection * getSectionForFunctionDescriptor(const Function *F, const TargetMachine &TM) const

On targets that use separate function descriptor symbols, return a section for the descriptor given i...

virtual void emitLinkerDirectives(MCStreamer &Streamer, Module &M) const

Process linker options metadata and emit platform-specific bits.

TargetLoweringObjectFile(const TargetLoweringObjectFile &)=delete

virtual void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym, const MachineModuleInfo *MMI) const

virtual MCSymbol * getTargetSymbol(const GlobalValue *GV, const TargetMachine &TM) const

Targets that have a special convention for their symbols could use this hook to return a specialized ...

virtual const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const

virtual MCSection * getUniqueSectionForFunction(const Function &F, const TargetMachine &TM) const

MCSection * SectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const

This method computes the appropriate section to emit the specified global variable or function defini...

Primary interface to the complete machine description for the target machine.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

This struct is a compact representation of a valid (non-zero power of two) alignment.