15 #ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H 16 #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H 27 class FoldingSetNodeID;
28 class MachineConstantPool;
35 virtual void anchor();
48 unsigned Alignment) = 0;
86 Alignment |= 1U << (
sizeof(
unsigned) * CHAR_BIT - 1);
93 return (
int)Alignment < 0;
97 return Alignment & ~(1 << (
sizeof(
unsigned) * CHAR_BIT - 1));
105 bool needsRelocation()
const;
121 unsigned PoolAlignment;
122 std::vector<MachineConstantPoolEntry>
Constants;
127 const DataLayout &getDataLayout()
const {
return DL; }
132 : PoolAlignment(1), DL(DL) {}
142 unsigned getConstantPoolIndex(
const Constant *
C,
unsigned Alignment);
147 bool isEmpty()
const {
return Constants.empty(); }
163 #endif // LLVM_CODEGEN_MACHINECONSTANTPOOL_H MachineConstantPoolValue * MachineCPVal
A parsed version of the target data layout string in and methods for querying it. ...
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
bool isEmpty() const
isEmpty - Return true if this constant pool contains no constants.
This class represents lattice values for constants.
Implements a dense probed hash-table based set.
virtual void print(raw_ostream &O) const =0
print - Implement operator<<
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)=0
MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned A)
MachineConstantPoolEntry(const Constant *V, unsigned A)
bool isMachineConstantPoolEntry() const
isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry is indeed a target specific ...
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)=0
This class is a data container for one entry in a MachineConstantPool.
MachineConstantPoolValue(Type *ty)
const Constant * ConstVal
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
unsigned getConstantPoolAlignment() const
getConstantPoolAlignment - Return the alignment required by the whole constant pool, of which the first element must be aligned.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
virtual ~MachineConstantPoolValue()=default
SectionKind - This is a simple POD value that classifies the properties of a section.
MachineConstantPool(const DataLayout &DL)
The only constructor.
Abstract base class for all machine specific constantpool value subclasses.
const std::vector< MachineConstantPoolEntry > & getConstants() const
unsigned Alignment
The required alignment for this entry.
Type * getType() const
getType - get type of this MachineConstantPoolValue.
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
This class implements an extremely fast bulk output stream that can only output to a stream...