13#ifndef LLVM_TARGET_CSKY_CONSTANTPOOLVALUE_H
14#define LLVM_TARGET_CSKY_CONSTANTPOOLVALUE_H
28class MachineBasicBlock;
76 Align Alignment)
override;
83 return this->LabelId ==
A->LabelId && this->PCAdjust ==
A->PCAdjust &&
84 this->Modifier ==
A->Modifier;
87 template <
typename Derived>
89 const std::vector<MachineConstantPoolEntry> &
Constants = CP->getConstants();
90 for (
unsigned i = 0, e =
Constants.size(); i != e; ++i) {
91 if (
Constants[i].isMachineConstantPoolEntry() &&
95 if (Derived *APC = dyn_cast<Derived>(CPV))
96 if (cast<Derived>(
this)->equals(APC))
128 Align Alignment)
override;
158 Align Alignment)
override;
186 Align Alignment)
override;
213 Align Alignment)
override;
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
The address of a basic block.
CSKY-specific constant pool values for Constants, Functions, and BlockAddresses.
const GlobalValue * getGV() const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
void print(raw_ostream &O) const override
print - Implement operator<<
static CSKYConstantPoolConstant * Create(const Constant *C, CSKYCP::CSKYCPKind Kind, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier, bool AddCurrentAddress, unsigned ID=0)
bool equals(const CSKYConstantPoolConstant *A) const
const BlockAddress * getBlockAddress() const
const Constant * getConstantPool() const
static bool classof(const CSKYConstantPoolValue *APV)
CSKY-specific constantpool value of a jump table.
bool equals(const CSKYConstantPoolJT *A) const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
static CSKYConstantPoolJT * Create(Type *Ty, int JTI, unsigned PCAdj, CSKYCP::CSKYCPModifier Modifier)
void print(raw_ostream &O) const override
print - Implement operator<<
static bool classof(const CSKYConstantPoolValue *ACPV)
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
CSKYConstantPoolMBB - CSKY-specific constantpool value of a machine basic block.
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
static CSKYConstantPoolMBB * Create(Type *Ty, const MachineBasicBlock *Mbb, unsigned PCAdjust)
static bool classof(const CSKYConstantPoolValue *ACPV)
bool equals(const CSKYConstantPoolMBB *A) const
void print(raw_ostream &O) const override
print - Implement operator<<
const MachineBasicBlock * getMBB() const
CSKYConstantPoolSymbol - CSKY-specific constantpool values for external symbols.
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
void print(raw_ostream &O) const override
print - Implement operator<<
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
static bool classof(const CSKYConstantPoolValue *ACPV)
bool equals(const CSKYConstantPoolSymbol *A) const
StringRef getSymbol() const
static CSKYConstantPoolSymbol * Create(Type *Ty, const char *S, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier)
CSKYConstantPoolValue - CSKY specific constantpool value.
bool isMachineBasicBlock() const
bool isGlobalValue() const
unsigned getLabelID() const
void print(raw_ostream &O) const override
print - Implement operator<<
bool equals(const CSKYConstantPoolValue *A) const
unsigned getPCAdjustment() const
int getExistingMachineCPValueImpl(MachineConstantPool *CP, Align Alignment)
bool mustAddCurrentAddress() const
bool isBlockAddress() const
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
CSKYCP::CSKYCPModifier Modifier
CSKYCP::CSKYCPModifier getModifier() const
const char * getModifierText() const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
This is an important base class in LLVM.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
Abstract base class for all machine specific constantpool value subclasses.
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.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
MaybeAlign getAlign(const Function &F, unsigned Index)
This struct is a compact representation of a valid (non-zero power of two) alignment.