33 bool addCurrentAddress)
35 PCAdjust(PCAdj), Modifier(modifier),
36 AddCurrentAddress(addCurrentAddress) {}
42 bool addCurrentAddress)
44 LabelId(id),
Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
45 AddCurrentAddress(addCurrentAddress) {}
76 if (ACPV->Kind == Kind &&
77 ACPV->PCAdjust == PCAdjust &&
78 ACPV->Modifier == Modifier) {
79 if (ACPV->LabelId == LabelId)
90 errs() <<
" " << *
this;
96 O <<
"-(LPC" << LabelId <<
"+" << (
unsigned)PCAdjust;
97 if (AddCurrentAddress) O <<
"-.";
106 ARMConstantPoolConstant::ARMConstantPoolConstant(
Type *Ty,
112 bool AddCurrentAddress)
116 ARMConstantPoolConstant::ARMConstantPoolConstant(
const Constant *C,
121 bool AddCurrentAddress)
151 bool AddCurrentAddress) {
157 return dyn_cast_or_null<GlobalValue>(CVal);
161 return dyn_cast_or_null<BlockAddress>(CVal);
165 unsigned Alignment) {
166 return getExistingMachineCPValueImpl<ARMConstantPoolConstant>(
CP, Alignment);
188 ARMConstantPoolSymbol::ARMConstantPoolSymbol(
LLVMContext &C,
const char *s,
192 bool AddCurrentAddress)
199 unsigned ID,
unsigned char PCAdj) {
204 unsigned Alignment) {
205 return getExistingMachineCPValueImpl<ARMConstantPoolSymbol>(
CP, Alignment);
227 ARMConstantPoolMBB::ARMConstantPoolMBB(
LLVMContext &C,
229 unsigned id,
unsigned char PCAdj,
231 bool AddCurrentAddress)
233 Modifier, AddCurrentAddress),
239 unsigned char PCAdj) {
244 unsigned Alignment) {
245 return getExistingMachineCPValueImpl<ARMConstantPoolMBB>(
CP, Alignment);
250 return ACPMBB && ACPMBB->MBB == MBB &&
void AddPointer(const void *Ptr)
Add* - Add various data types to Bit data.
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
int getNumber() const
getNumber - MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a M...
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
ARMConstantPoolValue - ARM specific constantpool value.
const char * getModifierText() const
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
Return the function type for an intrinsic.
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)
StringRef getName() const
Return a constant reference to the value's name.
BlockAddress - The address of a basic block.
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void AddInteger(signed I)
void print(raw_ostream &O) const override
print - Implement operator<<
const BlockAddress * getBlockAddress() const
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
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.
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.
This is an important base class in LLVM.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
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...
LLVMContext & getContext() const
All values hold a context through their type.
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<<
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.
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<<
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
static IntegerType * getInt32Ty(LLVMContext &C)
void AddString(StringRef String)
const ARM::ArchExtKind Kind
This class implements an extremely fast bulk output stream that can only output to a stream...
int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment) override
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)