LLVM: lib/Target/CSKY/CSKYConstantPoolValue.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

21using namespace llvm;

22

23

24

25

26

34

38 return "ADDR";

40 return "GOT";

42 return "GOTOFF";

44 return "PLT";

46 return "TLSIE";

48 return "TLSLE";

50 return "TLSGD";

52 return "";

53 }

55}

56

58 Align Alignment) {

60}

61

67

74

75

76

77

78

79CSKYConstantPoolConstant::CSKYConstantPoolConstant(

84 CVal(C) {}

85

92

99

104

109

113

115 Align Alignment) {

117}

118

120 ID.AddPointer(CVal);

121

123}

124

126 O << CVal->getName();

128}

129

130

131

132

133

134CSKYConstantPoolSymbol::CSKYConstantPoolSymbol(Type *Ty, const char *S,

135 unsigned PCAdjust,

137 bool AddCurrentAddress)

139 AddCurrentAddress),

140 S(strdup(S)) {}

141

147

149 Align Alignment) {

150

152}

153

155 ID.AddString(S);

157}

158

163

164

165

166

167

169 unsigned PCAdjust,

171 bool AddCurrentAddress)

173 AddCurrentAddress),

174 MBB(Mbb) {}

175

181

183 Align Alignment) {

185}

186

188 ID.AddPointer(MBB);

190}

191

193 O << "BB#" << MBB->getNumber();

195}

196

197

198

199

200

201CSKYConstantPoolJT::CSKYConstantPoolJT(Type *Ty, int JTIndex, unsigned PCAdj,

203 bool AddCurrentAddress)

205 AddCurrentAddress),

206 JTI(JTIndex) {}

207

211 return new CSKYConstantPoolJT(Ty, JTI, PCAdj, Modifier, false);

212}

213

215 Align Alignment) {

217}

218

220 ID.AddInteger(JTI);

222}

223

225 O << "JTI#" << JTI;

227}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

This file contains the declarations for the subclasses of Constant, which represent the different fla...

This file defines a hash set that can be used to remove duplication of nodes in a graph.

The address of a basic block.

const GlobalValue * getGV() const

Definition CSKYConstantPoolValue.cpp:100

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

Definition CSKYConstantPoolValue.cpp:114

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

Definition CSKYConstantPoolValue.cpp:119

void print(raw_ostream &O) const override

print - Implement operator<<

Definition CSKYConstantPoolValue.cpp:125

static CSKYConstantPoolConstant * Create(const Constant *C, CSKYCP::CSKYCPKind Kind, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier, bool AddCurrentAddress, unsigned ID=0)

Definition CSKYConstantPoolValue.cpp:86

const BlockAddress * getBlockAddress() const

Definition CSKYConstantPoolValue.cpp:105

const Constant * getConstantPool() const

Definition CSKYConstantPoolValue.cpp:110

CSKY-specific constantpool value of a jump table.

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

Definition CSKYConstantPoolValue.cpp:214

static CSKYConstantPoolJT * Create(Type *Ty, int JTI, unsigned PCAdj, CSKYCP::CSKYCPModifier Modifier)

Definition CSKYConstantPoolValue.cpp:209

void print(raw_ostream &O) const override

print - Implement operator<<

Definition CSKYConstantPoolValue.cpp:224

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

Definition CSKYConstantPoolValue.cpp:219

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

Definition CSKYConstantPoolValue.cpp:182

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

Definition CSKYConstantPoolValue.cpp:187

static CSKYConstantPoolMBB * Create(Type *Ty, const MachineBasicBlock *Mbb, unsigned PCAdjust)

Definition CSKYConstantPoolValue.cpp:176

void print(raw_ostream &O) const override

print - Implement operator<<

Definition CSKYConstantPoolValue.cpp:192

CSKYConstantPoolSymbol - CSKY-specific constantpool values for external symbols.

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

Definition CSKYConstantPoolValue.cpp:154

void print(raw_ostream &O) const override

print - Implement operator<<

Definition CSKYConstantPoolValue.cpp:159

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

Definition CSKYConstantPoolValue.cpp:148

static CSKYConstantPoolSymbol * Create(Type *Ty, const char *S, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier)

Definition CSKYConstantPoolValue.cpp:143

CSKYConstantPoolValue - CSKY specific constantpool value.

void print(raw_ostream &O) const override

print - Implement operator<<

Definition CSKYConstantPoolValue.cpp:68

CSKYConstantPoolValue(Type *Ty, CSKYCP::CSKYCPKind Kind, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier, bool AddCurrentAddress, unsigned ID=0)

Definition CSKYConstantPoolValue.cpp:27

int getExistingMachineCPValueImpl(MachineConstantPool *CP, Align Alignment)

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

Definition CSKYConstantPoolValue.cpp:62

CSKYCP::CSKYCPModifier Modifier

const char * getModifierText() const

Definition CSKYConstantPoolValue.cpp:35

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

Definition CSKYConstantPoolValue.cpp:57

This is an important base class in LLVM.

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

MachineConstantPoolValue(Type *ty)

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

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

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

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

bool isa(const From &Val)

isa - Return true if the parameter to the template is an instance of one of the template type argu...

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

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