Go to the documentation of this file.
13 #ifndef LLVM_TARGET_CSKY_CONSTANTPOOLVALUE_H
14 #define LLVM_TARGET_CSKY_CONSTANTPOOLVALUE_H
28 class 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();
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;
bool isMachineBasicBlock() const
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
This is an optimization pass for GlobalISel generic memory operations.
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 *APV)
int getExistingMachineCPValueImpl(MachineConstantPool *CP, Align Alignment)
CSKY-specific constantpool value of a jump table.
void print(raw_ostream &O) const override
print - Implement operator<<
CSKYCP::CSKYCPModifier Modifier
static CSKYConstantPoolConstant * Create(const Constant *C, CSKYCP::CSKYCPKind Kind, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier, bool AddCurrentAddress, unsigned ID=0)
bool equals(const CSKYConstantPoolJT *A) const
Abstract base class for all machine specific constantpool value subclasses.
The instances of the Type class are immutable: once they are created, they are never changed.
void print(raw_ostream &O) const override
print - Implement operator<<
bool isGlobalValue() const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
const Constant * getConstantPool() const
static bool classof(const CSKYConstantPoolValue *ACPV)
bool equals(const CSKYConstantPoolConstant *A) const
bool isBlockAddress() const
(vector float) vec_cmpeq(*A, *B) C
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
bool mustAddCurrentAddress() const
void print(raw_ostream &O) const override
print - Implement operator<<
This class implements an extremely fast bulk output stream that can only output to a stream.
This struct is a compact representation of a valid (non-zero power of two) alignment.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
const char * getModifierText() const
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
static CSKYConstantPoolSymbol * Create(Type *Ty, const char *S, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier)
CSKY-specific constant pool values for Constants, Functions, and BlockAddresses.
This is an important base class in LLVM.
unsigned getLabelID() const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
CSKYConstantPoolValue - CSKY specific constantpool value.
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
void print(raw_ostream &O) const override
print - Implement operator<<
static CSKYConstantPoolMBB * Create(Type *Ty, const MachineBasicBlock *Mbb, unsigned PCAdjust)
CSKYCP::CSKYCPModifier getModifier() const
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
The address of a basic block.
StringRef - Represent a constant reference to a string, i.e.
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
const BlockAddress * getBlockAddress() const
CSKYConstantPoolValue(Type *Ty, CSKYCP::CSKYCPKind Kind, unsigned PCAdjust, CSKYCP::CSKYCPModifier Modifier, bool AddCurrentAddress, unsigned ID=0)
static bool classof(const CSKYConstantPoolValue *ACPV)
const GlobalValue * getGV() const
CSKYConstantPoolSymbol - CSKY-specific constantpool values for external symbols.
unsigned getPCAdjustment() const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
bool getAlign(const Function &F, unsigned index, unsigned &align)
CSKYConstantPoolMBB - CSKY-specific constantpool value of a machine basic block.
const MachineBasicBlock * getMBB() const
bool equals(const CSKYConstantPoolValue *A) const
StringRef getSymbol() const
bool equals(const CSKYConstantPoolMBB *A) const
static bool classof(const CSKYConstantPoolValue *ACPV)
bool equals(const CSKYConstantPoolSymbol *A) const