16 #ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H
17 #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H
28 class FoldingSetNodeID;
32 class MachineConstantPool;
38 virtual void anchor();
50 unsigned Alignment) = 0;
122 unsigned PoolAlignment;
123 std::vector<MachineConstantPoolEntry>
Constants;
128 const DataLayout &getDataLayout()
const {
return DL; }
133 : PoolAlignment(1), DL(DL) {}
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...
SectionKind getSectionKind(const DataLayout *DL) const
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)
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)=0
This class is a data container for one entry in a MachineConstantPool.
MachineConstantPoolValue(Type *ty)
bool isMachineConstantPoolEntry() const
isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry is indeed a target specific ...
const Constant * ConstVal
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
bool isEmpty() const
isEmpty - Return true if this constant pool contains no constants.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
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.
void print(raw_ostream &OS) const
print - Used by the MachineFunction printer to print information about constant pool objects...
unsigned Alignment
The required alignment for this entry.
Type * getType() const
getType - get type of this MachineConstantPoolValue.
unsigned getConstantPoolAlignment() const
getConstantPoolAlignment - Return the alignment required by the whole constant pool, of which the first element must be aligned.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
virtual ~MachineConstantPoolValue()
bool needsRelocation() const
This method classifies the entry according to whether or not it may generate a relocation entry...
This class implements an extremely fast bulk output stream that can only output to a stream...
void dump() const
dump - Call print(cerr) to be called from the debugger.
const std::vector< MachineConstantPoolEntry > & getConstants() const
union llvm::MachineConstantPoolEntry::@35 Val
The constant itself.
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
unsigned getConstantPoolIndex(const Constant *C, unsigned Alignment)
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one...