14 #ifndef LLVM_TARGET_ARM_CONSTANTPOOLVALUE_H
15 #define LLVM_TARGET_ARM_CONSTANTPOOLVALUE_H
28 class MachineBasicBlock;
55 unsigned char PCAdjust;
58 bool AddCurrentAddress;
63 bool AddCurrentAddress);
67 bool AddCurrentAddress);
69 template <
typename Derived>
72 unsigned AlignMask = Alignment - 1;
74 for (
unsigned i = 0, e = Constants.size(); i != e; ++i) {
75 if (Constants[i].isMachineConstantPoolEntry() &&
76 (Constants[i].getAlignment() & AlignMask) == 0) {
79 if (Derived *APC = dyn_cast<Derived>(CPV))
80 if (cast<Derived>(
this)->equals(APC))
118 return this->LabelId == A->LabelId &&
119 this->PCAdjust == A->PCAdjust &&
120 this->Modifier == A->Modifier;
143 bool AddCurrentAddress);
149 bool AddCurrentAddress);
157 unsigned char PCAdj);
162 bool AddCurrentAddress);
193 bool AddCurrentAddress);
197 unsigned ID,
unsigned char PCAdj);
228 bool AddCurrentAddress);
233 unsigned ID,
unsigned char PCAdj);
The machine constant pool.
static bool classof(const ARMConstantPoolValue *APV)
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
virtual ~ARMConstantPoolValue()
const char * getModifierText() const
const GlobalValue * getGV() const
ARMConstantPoolValue(Type *Ty, unsigned id, ARMCP::ARMCPKind Kind, unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, bool AddCurrentAddress)
bool isGlobalValue() const
bool mustAddCurrentAddress() const
virtual void print(raw_ostream &O) const
print - Implement operator<<
ID
LLVM Calling Convention Representation.
static bool classof(const ARMConstantPoolValue *ACPV)
const BlockAddress * getBlockAddress() const
const MachineBasicBlock * getMBB() const
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
bool isMachineBasicBlock() const
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
bool isBlockAddress() const
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
static bool classof(const ARMConstantPoolValue *ACPV)
* if(!EatIfPresent(lltok::kw_thread_local)) return false
virtual void print(raw_ostream &O) const
print - Implement operator<<
bool equals(const ARMConstantPoolMBB *A) const
LLVM Constant Representation.
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
bool equals(const ARMConstantPoolValue *A) const
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
static ARMConstantPoolMBB * Create(LLVMContext &C, const MachineBasicBlock *mbb, unsigned ID, unsigned char PCAdj)
bool equals(const ARMConstantPoolSymbol *A) const
const char * getSymbol() const
static ARMConstantPoolSymbol * Create(LLVMContext &C, const char *s, unsigned ID, unsigned char PCAdj)
virtual unsigned getRelocationInfo() const
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
void print(raw_ostream *O) const
unsigned getLabelId() const
unsigned char getPCAdjustment() const
virtual void print(raw_ostream &O) const
print - Implement operator<<
const std::vector< MachineConstantPoolEntry > & getConstants() const
int getExistingMachineCPValueImpl(MachineConstantPool *CP, unsigned Alignment)
ARMCP::ARMCPModifier getModifier() const
virtual void print(raw_ostream &O) const
print - Implement operator<<
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)
bool equals(const ARMConstantPoolConstant *A) const