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);
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)
The machine constant pool.
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
virtual ~ARMConstantPoolValue()
const char * getModifierText() const
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
const GlobalValue * getGV() const
ARMConstantPoolValue(Type *Ty, unsigned id, ARMCP::ARMCPKind Kind, unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, bool AddCurrentAddress)
StringRef getName() const
#define llvm_unreachable(msg)
void AddInteger(signed I)
virtual void print(raw_ostream &O) const
print - Implement operator<<
ID
LLVM Calling Convention Representation.
const BlockAddress * getBlockAddress() const
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment)
virtual void print(raw_ostream &O) const
print - Implement operator<<
LLVM Constant Representation.
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
LLVMContext & getContext() const
All values hold a context through their type.
static ARMConstantPoolMBB * Create(LLVMContext &C, const MachineBasicBlock *mbb, unsigned ID, unsigned char PCAdj)
static ARMConstantPoolSymbol * Create(LLVMContext &C, const char *s, unsigned ID, unsigned char PCAdj)
static IntegerType * getInt32Ty(LLVMContext &C)
void AddString(StringRef String)
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID)
virtual void print(raw_ostream &O) const
print - Implement operator<<
virtual void print(raw_ostream &O) const
print - Implement operator<<
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)