16 #ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H 17 #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H 28 class FoldingSetNodeID;
29 class MachineConstantPool;
36 virtual void anchor();
49 unsigned Alignment) = 0;
87 Alignment |= 1U << (
sizeof(
unsigned) * CHAR_BIT - 1);
94 return (
int)Alignment < 0;
98 return Alignment & ~(1 << (
sizeof(
unsigned) * CHAR_BIT - 1));
106 bool needsRelocation()
const;
122 unsigned PoolAlignment;
123 std::vector<MachineConstantPoolEntry>
Constants;
128 const DataLayout &getDataLayout()
const {
return DL; }
133 : PoolAlignment(1), DL(DL) {}
143 unsigned getConstantPoolIndex(
const Constant *
C,
unsigned Alignment);
148 bool isEmpty()
const {
return Constants.empty(); }
164 #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...
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
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...