LLVM: lib/Target/ARM/ARMConstantPoolValue.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H

14#define LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H

15

21#include

22#include

23

24namespace llvm {

25

28class GlobalValue;

29class GlobalVariable;

30class LLVMContext;

31class MachineBasicBlock;

32class raw_ostream;

34

35namespace ARMCP {

36

45

48 TLSGD,

49 GOT_PREL,

50 GOTTPOFF,

51 TPOFF,

52 SECREL,

53 SBREL,

54 };

55

56}

57

58

59

60

62 unsigned LabelId;

64 unsigned char PCAdjust;

65

67 bool AddCurrentAddress;

68

69protected:

72 bool AddCurrentAddress);

73

76 bool AddCurrentAddress);

77

78 template

80 const std::vector &Constants = CP->getConstants();

81 for (unsigned i = 0, e = Constants.size(); i != e; ++i) {

82 if (Constants[i].isMachineConstantPoolEntry() &&

83 Constants[i].getAlign() >= Alignment) {

84 auto *CPV =

86 if (Derived *APC = dyn_cast(CPV))

87 if (cast(this)->equals(APC))

88 return i;

89 }

90 }

91

92 return -1;

93 }

94

95public:

97

101

103

106

113

115 Align Alignment) override;

116

118

119

120

122

124 return this->LabelId == A->LabelId &&

125 this->PCAdjust == A->PCAdjust &&

126 this->Modifier == A->Modifier;

127 }

128

131 void dump() const;

132};

133

135 V.print(O);

136 return O;

137}

138

139

140

142 const Constant *CVal;

144

146 unsigned ID,

148 unsigned char PCAdj,

150 bool AddCurrentAddress);

152 unsigned ID,

154 unsigned char PCAdj,

156 bool AddCurrentAddress);

158

159public:

164 const Constant *Initializer);

167 unsigned char PCAdj);

170 unsigned char PCAdj,

172 bool AddCurrentAddress);

173

176

178

181 }

182

184 return CVal;

185 }

186

188 Align Alignment) override;

189

190

191

193

195

197

201 }

202

205 }

206};

207

208

209

211 const std::string S;

212

215 bool AddCurrentAddress);

216

217public:

219 unsigned char PCAdj);

220

222

224 Align Alignment) override;

225

227

228

229

231

233

236 }

237

240 }

241};

242

243

244

247

250 bool AddCurrentAddress);

251

252public:

255 unsigned ID, unsigned char PCAdj);

256

258

260 Align Alignment) override;

261

263

264

265

267

269

272 }

273

276 }

277};

278

279}

280

281#endif

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...

This file defines the SmallPtrSet class.

ARMConstantPoolConstant - ARM-specific constant pool values for Constants, Functions,...

const GlobalValue * getGV() const

bool equals(const ARMConstantPoolConstant *A) const

static bool classof(const ARMConstantPoolValue *APV)

static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)

iterator_range< promoted_iterator > promotedGlobals()

const Constant * getPromotedGlobalInit() const

bool hasSameValue(ARMConstantPoolValue *ACPV) override

hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...

void print(raw_ostream &O) const override

print - Implement operator<<

const BlockAddress * getBlockAddress() const

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

ARMConstantPoolMBB - ARM-specific constantpool value of a machine basic block.

bool equals(const ARMConstantPoolMBB *A) const

const MachineBasicBlock * getMBB() const

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

static ARMConstantPoolMBB * Create(LLVMContext &C, const MachineBasicBlock *mbb, unsigned ID, unsigned char PCAdj)

bool hasSameValue(ARMConstantPoolValue *ACPV) override

hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...

void print(raw_ostream &O) const override

print - Implement operator<<

static bool classof(const ARMConstantPoolValue *ACPV)

ARMConstantPoolSymbol - ARM-specific constantpool values for external symbols.

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

bool hasSameValue(ARMConstantPoolValue *ACPV) override

hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

void print(raw_ostream &O) const override

print - Implement operator<<

static ARMConstantPoolSymbol * Create(LLVMContext &C, StringRef s, unsigned ID, unsigned char PCAdj)

static bool classof(const ARMConstantPoolValue *ACPV)

StringRef getSymbol() const

bool equals(const ARMConstantPoolSymbol *A) const

ARMConstantPoolValue - ARM specific constantpool value.

bool isPromotedGlobal() const

unsigned char getPCAdjustment() const

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

void print(raw_ostream *O) const

~ARMConstantPoolValue() override

void print(raw_ostream &O) const override

print - Implement operator<<

bool isMachineBasicBlock() const

int getExistingMachineCPValueImpl(MachineConstantPool *CP, Align Alignment)

bool isGlobalValue() const

bool equals(const ARMConstantPoolValue *A) const

ARMCP::ARMCPModifier getModifier() const

bool mustAddCurrentAddress() const

StringRef getModifierText() const

unsigned getLabelId() const

virtual bool hasSameValue(ARMConstantPoolValue *ACPV)

hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...

bool isBlockAddress() const

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

The address of a basic block.

This is an important base class in LLVM.

FoldingSetNodeID - This class is used to gather all the unique data bits of a node.

This is an important class for using LLVM in a threaded context.

Abstract base class for all machine specific constantpool value subclasses.

The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...

SmallPtrSetIterator - This implements a const_iterator for SmallPtrSet.

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

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

The instances of the Type class are immutable: once they are created, they are never changed.

A range adaptor for a pair of iterators.

This class implements an extremely fast bulk output stream that can only output to a stream.

This provides a very simple, boring adaptor for a begin and end iterator into a range type.

@ SECREL

Thread Pointer Offset.

@ GOT_PREL

Thread Local Storage (General Dynamic Mode)

@ SBREL

Section Relative (Windows TLS)

@ GOTTPOFF

Global Offset Table, PC Relative.

@ TPOFF

Global Offset Table, Thread Pointer Offset.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

MaybeAlign getAlign(const Function &F, unsigned Index)

raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)

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