LLVM: include/llvm/CodeGen/MachineConstantPool.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H
16#define LLVM_CODEGEN_MACHINECONSTANTPOOL_H
17
21#include
22#include
23
24namespace llvm {
25
32
33
34
36 virtual void anchor();
37
39
40public:
43
45
47
49 Align Alignment) = 0;
50
52
53
55};
56
59 V.print(OS);
60 return OS;
61}
62
63
64
65
66
68public:
69
70 union {
74
75
77
79
82 Val.ConstVal = V;
83 }
84
87 Val.MachineCPVal = V;
88 }
89
90
91
92
94
96
98
99
100
101
103
105};
106
107
108
109
110
111
112
113
114
115
116
118 Align PoolAlignment;
119 std::vector Constants;
120
123
124 const DataLayout &getDataLayout() const { return DL; }
125
126public:
127
129 : PoolAlignment(1), DL(DL) {}
131
132
133
135
136
137
138
141
142
143 bool isEmpty() const { return Constants.empty(); }
144
145 const std::vector &getConstants() const {
146 return Constants;
147 }
148
149
150
152
153
154 void dump() const;
155};
156
157}
158
159#endif
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the DenseSet and SmallDenseSet classes.
This is an important base class in LLVM.
A parsed version of the target data layout string in and methods for querying it.
Implements a dense probed hash-table based set.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
union llvm::MachineConstantPoolEntry::@004270020304201266316354007027341142157160323045 Val
The constant itself.
bool needsRelocation() const
This method classifies the entry according to whether or not it may generate a relocation entry.
bool isMachineConstantPoolEntry() const
isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry is indeed a target specific ...
Definition MachineConstantPool.h:93
MachineConstantPoolEntry(const Constant *V, Align A)
Definition MachineConstantPool.h:80
MachineConstantPoolValue * MachineCPVal
Definition MachineConstantPool.h:72
Align Alignment
The required alignment for this entry.
Definition MachineConstantPool.h:76
unsigned getSizeInBytes(const DataLayout &DL) const
SectionKind getSectionKind(const DataLayout *DL) const
bool IsMachineConstantPoolEntry
Definition MachineConstantPool.h:78
const Constant * ConstVal
Definition MachineConstantPool.h:71
MachineConstantPoolEntry(MachineConstantPoolValue *V, Align A)
Definition MachineConstantPool.h:85
Align getAlign() const
Definition MachineConstantPool.h:95
Abstract base class for all machine specific constantpool value subclasses.
Definition MachineConstantPool.h:35
virtual int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment)=0
virtual void print(raw_ostream &O) const =0
print - Implement operator<<
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)=0
virtual ~MachineConstantPoolValue()=default
MachineConstantPoolValue(Type *ty)
Definition MachineConstantPool.h:41
Type * getType() const
Definition MachineConstantPool.h:44
virtual unsigned getSizeInBytes(const DataLayout &DL) const
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
Definition MachineConstantPool.h:117
void dump() const
dump - Call print(cerr) to be called from the debugger.
MachineConstantPool(const DataLayout &DL)
The only constructor.
Definition MachineConstantPool.h:128
Align getConstantPoolAlign() const
Return the alignment required by the whole constant pool, of which the first element must be aligned.
Definition MachineConstantPool.h:134
const std::vector< MachineConstantPoolEntry > & getConstants() const
Definition MachineConstantPool.h:145
void print(raw_ostream &OS) const
print - Used by the MachineFunction printer to print information about constant pool objects.
bool isEmpty() const
isEmpty - Return true if this constant pool contains no constants.
Definition MachineConstantPool.h:143
unsigned getConstantPoolIndex(const Constant *C, Align Alignment)
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one.
SectionKind - This is a simple POD value that classifies the properties of a section.
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.
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.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
This struct is a compact representation of a valid (non-zero power of two) alignment.