LLVM: lib/Target/Xtensa/XtensaConstantPoolValue.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
21#include
22using namespace llvm;
23
29
34 Kind(Kind), Modifier(Modifier) {}
35
37
39 switch (Modifier) {
41 return "";
43 return "@TPOFF";
44 }
46}
47
49 Align Alignment) {
51}
52
54 ID.AddInteger(LabelId);
55}
56
58 if (ACPV->Kind == Kind) {
59 if (ACPV->LabelId == LabelId)
60 return true;
61 }
62 return false;
63}
64
65#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
67#endif
68
70
71
72
73
74
75XtensaConstantPoolConstant::XtensaConstantPoolConstant(
78
82 return new XtensaConstantPoolConstant(C, ID, Kind);
83}
84
88
94
96 const XtensaConstantPoolConstant *ACPC =
98 return ACPC && ACPC->CVal == CVal &&
100}
101
103 ID.AddPointer(CVal);
105}
106
108 O << CVal->getName();
110}
111
112XtensaConstantPoolSymbol::XtensaConstantPoolSymbol(
113 LLVMContext &C, const char *Str, unsigned ID, bool PrivLinkage,
116 PrivateLinkage(PrivLinkage) {}
117
120 bool PrivLinkage,
122
123{
124 return new XtensaConstantPoolSymbol(C, Str, ID, PrivLinkage, Modifier);
125}
126
128 Align Alignment) {
130}
131
133 const XtensaConstantPoolSymbol *ACPS =
136}
137
139 ID.AddString(S);
141}
142
147
148XtensaConstantPoolMBB::XtensaConstantPoolMBB(LLVMContext &C,
150 unsigned Id)
152
155 unsigned Idx) {
156 return new XtensaConstantPoolMBB(C, M, Idx);
157}
158
160 Align Alignment) {
162}
163
166 return ACPMBB && ACPMBB->MBB == MBB &&
168}
169
171 ID.AddPointer(MBB);
173}
174
176 O << "BB#" << MBB->getNumber();
178}
179
180XtensaConstantPoolJumpTable::XtensaConstantPoolJumpTable(LLVMContext &C,
181 unsigned Index)
183
185 unsigned Idx) {
186 return new XtensaConstantPoolJumpTable(C, Idx);
187}
188
194
196 const XtensaConstantPoolJumpTable *ACPJT =
198 return ACPJT && ACPJT->Idx == Idx &&
200}
201
203
205 O << "JT" << Idx;
207}
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.
static SymbolRef::Type getType(const Symbol *Sym)
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.
MachineConstantPoolValue(Type *ty)
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
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.
XtensaConstantPoolConstant - Xtensa-specific constant pool values for Constants (for example BlockAdd...
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
Definition XtensaConstantPoolValue.cpp:89
bool hasSameValue(XtensaConstantPoolValue *ACPV) override
hasSameValue - Return true if this Xtensa constpool value can share the same constantpool entry as an...
Definition XtensaConstantPoolValue.cpp:95
const BlockAddress * getBlockAddress() const
Definition XtensaConstantPoolValue.cpp:85
static XtensaConstantPoolConstant * Create(const Constant *C, unsigned ID, XtensaCP::XtensaCPKind Kind)
Definition XtensaConstantPoolValue.cpp:80
void print(raw_ostream &O) const override
print - Implement operator<<
Definition XtensaConstantPoolValue.cpp:107
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
Definition XtensaConstantPoolValue.cpp:102
static XtensaConstantPoolJumpTable * Create(LLVMContext &C, unsigned Idx)
Definition XtensaConstantPoolValue.cpp:184
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
Definition XtensaConstantPoolValue.cpp:202
void print(raw_ostream &O) const override
print - Implement operator<<
Definition XtensaConstantPoolValue.cpp:204
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
Definition XtensaConstantPoolValue.cpp:189
bool hasSameValue(XtensaConstantPoolValue *ACPV) override
hasSameValue - Return true if this Xtensa constpool value can share the same constantpool entry as an...
Definition XtensaConstantPoolValue.cpp:195
static XtensaConstantPoolMBB * Create(LLVMContext &C, const MachineBasicBlock *M, unsigned ID)
Definition XtensaConstantPoolValue.cpp:153
void print(raw_ostream &O) const override
print - Implement operator<<
Definition XtensaConstantPoolValue.cpp:175
bool hasSameValue(XtensaConstantPoolValue *ACPV) override
hasSameValue - Return true if this Xtensa constpool value can share the same constantpool entry as an...
Definition XtensaConstantPoolValue.cpp:164
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
Definition XtensaConstantPoolValue.cpp:170
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
Definition XtensaConstantPoolValue.cpp:159
XtensaConstantPoolSymbol - Xtensa-specific constantpool values for external symbols.
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
Definition XtensaConstantPoolValue.cpp:138
void print(raw_ostream &O) const override
print - Implement operator<<
Definition XtensaConstantPoolValue.cpp:143
static XtensaConstantPoolSymbol * Create(LLVMContext &C, const char *S, unsigned ID, bool PrivLinkage, XtensaCP::XtensaCPModifier Modifier=XtensaCP::no_modifier)
Definition XtensaConstantPoolValue.cpp:119
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
Definition XtensaConstantPoolValue.cpp:127
bool hasSameValue(XtensaConstantPoolValue *ACPV) override
hasSameValue - Return true if this Xtensa constpool value can share the same constantpool entry as an...
Definition XtensaConstantPoolValue.cpp:132
XtensaConstantPoolValue - Xtensa specific constantpool value.
virtual bool hasSameValue(XtensaConstantPoolValue *ACPV)
hasSameValue - Return true if this Xtensa constpool value can share the same constantpool entry as an...
Definition XtensaConstantPoolValue.cpp:57
~XtensaConstantPoolValue() override
Definition XtensaConstantPoolValue.cpp:36
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
Definition XtensaConstantPoolValue.cpp:48
int getExistingMachineCPValueImpl(MachineConstantPool *CP, Align Alignment)
void print(raw_ostream &O) const override
print - Implement operator<<
Definition XtensaConstantPoolValue.cpp:69
XtensaConstantPoolValue(Type *Ty, unsigned ID, XtensaCP::XtensaCPKind Kind, XtensaCP::XtensaCPModifier Modifier=XtensaCP::no_modifier)
Definition XtensaConstantPoolValue.cpp:24
StringRef getModifierText() const
Definition XtensaConstantPoolValue.cpp:38
void dump() const
Definition XtensaConstantPoolValue.cpp:66
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
Definition XtensaConstantPoolValue.cpp:53
This class implements an extremely fast bulk output stream that can only output to a stream.
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.
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
auto dyn_cast_or_null(const Y &Val)
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
LLVM_ABI raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
This struct is a compact representation of a valid (non-zero power of two) alignment.