14 #ifndef LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H
15 #define LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_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))
109 unsigned Alignment)
override;
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);
168 unsigned Alignment)
override;
193 bool AddCurrentAddress);
197 unsigned ID,
unsigned char PCAdj);
202 unsigned Alignment)
override;
228 bool AddCurrentAddress);
233 unsigned ID,
unsigned char PCAdj);
238 unsigned Alignment)
override;
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
static bool classof(const ARMConstantPoolValue *APV)
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
ARMConstantPoolValue - ARM specific constantpool value.
const char * getModifierText() const
void print(raw_ostream &O) const override
print - Implement operator<<
const GlobalValue * getGV() const
ARMConstantPoolValue(Type *Ty, unsigned id, ARMCP::ARMCPKind Kind, unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, bool AddCurrentAddress)
bool isGlobalValue() const
BlockAddress - The address of a basic block.
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
bool mustAddCurrentAddress() const
void print(raw_ostream &O) const override
print - Implement operator<<
static bool classof(const ARMConstantPoolValue *ACPV)
const BlockAddress * getBlockAddress() const
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
const MachineBasicBlock * getMBB() const
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
bool isMachineBasicBlock() const
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
bool hasSameValue(ARMConstantPoolValue *ACPV) override
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
bool isBlockAddress() const
static bool classof(const ARMConstantPoolValue *ACPV)
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
bool equals(const ARMConstantPoolMBB *A) const
This is an important base class in LLVM.
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
bool hasSameValue(ARMConstantPoolValue *ACPV) override
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
bool equals(const ARMConstantPoolValue *A) const
Abstract base class for all machine specific constantpool value subclasses.
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
static ARMConstantPoolMBB * Create(LLVMContext &C, const MachineBasicBlock *mbb, unsigned ID, unsigned char PCAdj)
void print(raw_ostream &O) const override
print - Implement operator<<
bool equals(const ARMConstantPoolSymbol *A) const
ARMConstantPoolConstant - ARM-specific constant pool values for Constants, Functions, and BlockAddresses.
const char * getSymbol() const
ARMConstantPoolSymbol - ARM-specific constantpool values for external symbols.
bool hasSameValue(ARMConstantPoolValue *ACPV) override
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
~ARMConstantPoolValue() override
ARMConstantPoolMBB - ARM-specific constantpool value of a machine basic block.
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
static ARMConstantPoolSymbol * Create(LLVMContext &C, const char *s, unsigned ID, unsigned char PCAdj)
void print(raw_ostream &O) const override
print - Implement operator<<
unsigned getRelocationInfo() const override
getRelocationInfo - This method classifies the entry according to whether or not it may generate a re...
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
void print(raw_ostream *O) const
unsigned getLabelId() const
unsigned char getPCAdjustment() const
This class implements an extremely fast bulk output stream that can only output to a stream...
const std::vector< MachineConstantPoolEntry > & getConstants() const
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
int getExistingMachineCPValueImpl(MachineConstantPool *CP, unsigned Alignment)
ARMCP::ARMCPModifier getModifier() const
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)
bool equals(const ARMConstantPoolConstant *A) const