14 #ifndef LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H
15 #define LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H
29 class MachineBasicBlock;
58 unsigned char PCAdjust;
61 bool AddCurrentAddress;
66 bool AddCurrentAddress);
70 bool AddCurrentAddress);
72 template <
typename Derived>
75 unsigned AlignMask = Alignment - 1;
77 for (
unsigned i = 0, e = Constants.size();
i != e; ++
i) {
78 if (Constants[
i].isMachineConstantPoolEntry() &&
79 (Constants[
i].getAlignment() & AlignMask) == 0) {
82 if (Derived *APC = dyn_cast<Derived>(CPV))
83 if (cast<Derived>(
this)->equals(APC))
111 unsigned Alignment)
override;
120 return this->LabelId == A->LabelId &&
121 this->PCAdjust == A->PCAdjust &&
122 this->Modifier == A->Modifier;
146 bool AddCurrentAddress);
152 bool AddCurrentAddress);
163 unsigned char PCAdj);
168 bool AddCurrentAddress);
173 return dyn_cast_or_null<GlobalVariable>(GVar);
180 unsigned Alignment)
override;
206 bool AddCurrentAddress);
210 unsigned char PCAdj);
215 unsigned Alignment)
override;
241 bool AddCurrentAddress);
246 unsigned ID,
unsigned char PCAdj);
251 unsigned Alignment)
override;
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
static ARMConstantPoolSymbol * Create(LLVMContext &C, StringRef s, unsigned ID, unsigned char PCAdj)
static bool classof(const ARMConstantPoolValue *APV)
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
ARMConstantPoolValue - ARM specific constantpool value.
Global Offset Table, Thread Pointer Offset.
Global Offset Table, PC Relative.
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
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
const GlobalVariable * getPromotedGlobal() const
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.
const Constant * getPromotedGlobalInit() const
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...
Thread Local Storage (General Dynamic Mode)
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.
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.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
void print(raw_ostream &O) const override
print - Implement operator<<
Section Relative (Windows TLS)
bool isPromotedGlobal() const
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
void print(raw_ostream *O) const
unsigned getLabelId() const
unsigned char getPCAdjustment() const
StringRef getSymbol() const
This class implements an extremely fast bulk output stream that can only output to a stream...
const std::vector< MachineConstantPoolEntry > & getConstants() const
StringRef getModifierText() const
StringRef - Represent a constant reference to a string, i.e.
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
int getExistingMachineCPValueImpl(MachineConstantPool *CP, unsigned Alignment)
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
ARMCP::ARMCPModifier getModifier() const
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)
bool equals(const ARMConstantPoolConstant *A) const