Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- ARMConstantPoolValue.h - ARM constantpool value ---------*- C++ -*-===// |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements the ARM specific constantpool value class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 14 | #ifndef LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H |
| 15 | #define LLVM_LIB_TARGET_ARM_ARMCONSTANTPOOLVALUE_H |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 16 | |
| 17 | #include "llvm/CodeGen/MachineConstantPool.h" |
Benjamin Kramer | 2ef689c | 2013-09-16 10:17:31 +0000 | [diff] [blame] | 18 | #include "llvm/Support/Casting.h" |
Jim Grosbach | a942ad4 | 2010-11-09 21:36:17 +0000 | [diff] [blame] | 19 | #include "llvm/Support/ErrorHandling.h" |
Daniel Dunbar | 0904134 | 2010-06-15 14:50:42 +0000 | [diff] [blame] | 20 | #include <cstddef> |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 21 | |
| 22 | namespace llvm { |
| 23 | |
Bob Wilson | 433ab09 | 2009-11-02 16:59:06 +0000 | [diff] [blame] | 24 | class BlockAddress; |
Bill Wendling | a1127b2 | 2011-09-29 23:48:44 +0000 | [diff] [blame] | 25 | class Constant; |
Dan Gohman | 0597e5b | 2008-07-11 20:38:31 +0000 | [diff] [blame] | 26 | class GlobalValue; |
Owen Anderson | 55f1c09 | 2009-08-13 21:58:54 +0000 | [diff] [blame] | 27 | class LLVMContext; |
Bill Wendling | a1127b2 | 2011-09-29 23:48:44 +0000 | [diff] [blame] | 28 | class MachineBasicBlock; |
Dan Gohman | 0597e5b | 2008-07-11 20:38:31 +0000 | [diff] [blame] | 29 | |
Jim Grosbach | 20eac92 | 2009-09-01 01:57:56 +0000 | [diff] [blame] | 30 | namespace ARMCP { |
| 31 | enum ARMCPKind { |
| 32 | CPValue, |
Bob Wilson | 433ab09 | 2009-11-02 16:59:06 +0000 | [diff] [blame] | 33 | CPExtSymbol, |
| 34 | CPBlockAddress, |
Bill Wendling | a1127b2 | 2011-09-29 23:48:44 +0000 | [diff] [blame] | 35 | CPLSDA, |
| 36 | CPMachineBasicBlock |
Jim Grosbach | 20eac92 | 2009-09-01 01:57:56 +0000 | [diff] [blame] | 37 | }; |
Jim Grosbach | a942ad4 | 2010-11-09 21:36:17 +0000 | [diff] [blame] | 38 | |
| 39 | enum ARMCPModifier { |
| 40 | no_modifier, |
| 41 | TLSGD, |
Peter Collingbourne | 97aae40 | 2015-10-26 18:23:16 +0000 | [diff] [blame] | 42 | GOT_PREL, |
Jim Grosbach | a942ad4 | 2010-11-09 21:36:17 +0000 | [diff] [blame] | 43 | GOTTPOFF, |
| 44 | TPOFF |
| 45 | }; |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 46 | } |
Jim Grosbach | 20eac92 | 2009-09-01 01:57:56 +0000 | [diff] [blame] | 47 | |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 48 | /// ARMConstantPoolValue - ARM specific constantpool value. This is used to |
Bob Wilson | 4c00a52 | 2009-11-02 17:10:37 +0000 | [diff] [blame] | 49 | /// represent PC-relative displacement between the address of the load |
Bob Wilson | 433ab09 | 2009-11-02 16:59:06 +0000 | [diff] [blame] | 50 | /// instruction and the constant being loaded, i.e. (&GV-(LPIC+8)). |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 51 | class ARMConstantPoolValue : public MachineConstantPoolValue { |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 52 | unsigned LabelId; // Label id of the load. |
Bob Wilson | 433ab09 | 2009-11-02 16:59:06 +0000 | [diff] [blame] | 53 | ARMCP::ARMCPKind Kind; // Kind of constant. |
Bob Wilson | 4c00a52 | 2009-11-02 17:10:37 +0000 | [diff] [blame] | 54 | unsigned char PCAdjust; // Extra adjustment if constantpool is pc-relative. |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 55 | // 8 for ARM, 4 for Thumb. |
Jim Grosbach | a942ad4 | 2010-11-09 21:36:17 +0000 | [diff] [blame] | 56 | ARMCP::ARMCPModifier Modifier; // GV modifier i.e. (&GV(modifier)-(LPIC+8)) |
Lauro Ramos Venancio | c39c12a | 2007-04-27 13:54:47 +0000 | [diff] [blame] | 57 | bool AddCurrentAddress; |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 58 | |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 59 | protected: |
| 60 | ARMConstantPoolValue(Type *Ty, unsigned id, ARMCP::ARMCPKind Kind, |
| 61 | unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, |
| 62 | bool AddCurrentAddress); |
| 63 | |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 64 | ARMConstantPoolValue(LLVMContext &C, unsigned id, ARMCP::ARMCPKind Kind, |
| 65 | unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, |
| 66 | bool AddCurrentAddress); |
Benjamin Kramer | 2ef689c | 2013-09-16 10:17:31 +0000 | [diff] [blame] | 67 | |
| 68 | template <typename Derived> |
| 69 | int getExistingMachineCPValueImpl(MachineConstantPool *CP, |
| 70 | unsigned Alignment) { |
| 71 | unsigned AlignMask = Alignment - 1; |
| 72 | const std::vector<MachineConstantPoolEntry> &Constants = CP->getConstants(); |
| 73 | for (unsigned i = 0, e = Constants.size(); i != e; ++i) { |
| 74 | if (Constants[i].isMachineConstantPoolEntry() && |
| 75 | (Constants[i].getAlignment() & AlignMask) == 0) { |
| 76 | ARMConstantPoolValue *CPV = |
| 77 | (ARMConstantPoolValue *)Constants[i].Val.MachineCPVal; |
| 78 | if (Derived *APC = dyn_cast<Derived>(CPV)) |
| 79 | if (cast<Derived>(this)->equals(APC)) |
| 80 | return i; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | return -1; |
| 85 | } |
| 86 | |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 87 | public: |
Alexander Kornienko | f817c1c | 2015-04-11 02:11:45 +0000 | [diff] [blame] | 88 | ~ARMConstantPoolValue() override; |
Lauro Ramos Venancio | ee2d164 | 2007-04-22 00:04:12 +0000 | [diff] [blame] | 89 | |
Jim Grosbach | a942ad4 | 2010-11-09 21:36:17 +0000 | [diff] [blame] | 90 | ARMCP::ARMCPModifier getModifier() const { return Modifier; } |
Bill Wendling | e8e4dbf | 2011-09-30 18:42:06 +0000 | [diff] [blame] | 91 | const char *getModifierText() const; |
Jim Grosbach | a942ad4 | 2010-11-09 21:36:17 +0000 | [diff] [blame] | 92 | bool hasModifier() const { return Modifier != ARMCP::no_modifier; } |
Bill Wendling | e8e4dbf | 2011-09-30 18:42:06 +0000 | [diff] [blame] | 93 | |
Lauro Ramos Venancio | c39c12a | 2007-04-27 13:54:47 +0000 | [diff] [blame] | 94 | bool mustAddCurrentAddress() const { return AddCurrentAddress; } |
Bill Wendling | e8e4dbf | 2011-09-30 18:42:06 +0000 | [diff] [blame] | 95 | |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 96 | unsigned getLabelId() const { return LabelId; } |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 97 | unsigned char getPCAdjustment() const { return PCAdjust; } |
Bill Wendling | e8e4dbf | 2011-09-30 18:42:06 +0000 | [diff] [blame] | 98 | |
Bob Wilson | 433ab09 | 2009-11-02 16:59:06 +0000 | [diff] [blame] | 99 | bool isGlobalValue() const { return Kind == ARMCP::CPValue; } |
| 100 | bool isExtSymbol() const { return Kind == ARMCP::CPExtSymbol; } |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 101 | bool isBlockAddress() const { return Kind == ARMCP::CPBlockAddress; } |
Bill Wendling | e8e4dbf | 2011-09-30 18:42:06 +0000 | [diff] [blame] | 102 | bool isLSDA() const { return Kind == ARMCP::CPLSDA; } |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 103 | bool isMachineBasicBlock() const{ return Kind == ARMCP::CPMachineBasicBlock; } |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 104 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 105 | int getExistingMachineCPValue(MachineConstantPool *CP, |
| 106 | unsigned Alignment) override; |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 107 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 108 | void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 109 | |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 110 | /// hasSameValue - Return true if this ARM constpool value can share the same |
| 111 | /// constantpool entry as another ARM constpool value. |
| 112 | virtual bool hasSameValue(ARMConstantPoolValue *ACPV); |
Evan Cheng | 7ff8319 | 2009-11-07 03:52:02 +0000 | [diff] [blame] | 113 | |
Bill Wendling | f977ff5 | 2011-10-01 12:44:28 +0000 | [diff] [blame] | 114 | bool equals(const ARMConstantPoolValue *A) const { |
| 115 | return this->LabelId == A->LabelId && |
| 116 | this->PCAdjust == A->PCAdjust && |
| 117 | this->Modifier == A->Modifier; |
| 118 | } |
| 119 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 120 | void print(raw_ostream &O) const override; |
Evan Cheng | de9dbc5 | 2008-10-29 23:55:17 +0000 | [diff] [blame] | 121 | void print(raw_ostream *O) const { if (O) print(*O); } |
Evan Cheng | de9dbc5 | 2008-10-29 23:55:17 +0000 | [diff] [blame] | 122 | void dump() const; |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 123 | }; |
Evan Cheng | de9dbc5 | 2008-10-29 23:55:17 +0000 | [diff] [blame] | 124 | |
Evan Cheng | de9dbc5 | 2008-10-29 23:55:17 +0000 | [diff] [blame] | 125 | inline raw_ostream &operator<<(raw_ostream &O, const ARMConstantPoolValue &V) { |
| 126 | V.print(O); |
| 127 | return O; |
| 128 | } |
| 129 | |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 130 | /// ARMConstantPoolConstant - ARM-specific constant pool values for Constants, |
| 131 | /// Functions, and BlockAddresses. |
| 132 | class ARMConstantPoolConstant : public ARMConstantPoolValue { |
| 133 | const Constant *CVal; // Constant being loaded. |
| 134 | |
| 135 | ARMConstantPoolConstant(const Constant *C, |
| 136 | unsigned ID, |
| 137 | ARMCP::ARMCPKind Kind, |
| 138 | unsigned char PCAdj, |
| 139 | ARMCP::ARMCPModifier Modifier, |
| 140 | bool AddCurrentAddress); |
Bill Wendling | f117a35 | 2011-10-01 07:52:37 +0000 | [diff] [blame] | 141 | ARMConstantPoolConstant(Type *Ty, const Constant *C, |
| 142 | unsigned ID, |
| 143 | ARMCP::ARMCPKind Kind, |
| 144 | unsigned char PCAdj, |
| 145 | ARMCP::ARMCPModifier Modifier, |
| 146 | bool AddCurrentAddress); |
| 147 | |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 148 | public: |
| 149 | static ARMConstantPoolConstant *Create(const Constant *C, unsigned ID); |
Bill Wendling | f117a35 | 2011-10-01 07:52:37 +0000 | [diff] [blame] | 150 | static ARMConstantPoolConstant *Create(const GlobalValue *GV, |
| 151 | ARMCP::ARMCPModifier Modifier); |
Bill Wendling | 6722556 | 2011-10-01 06:44:24 +0000 | [diff] [blame] | 152 | static ARMConstantPoolConstant *Create(const Constant *C, unsigned ID, |
| 153 | ARMCP::ARMCPKind Kind, |
| 154 | unsigned char PCAdj); |
Bill Wendling | f117a35 | 2011-10-01 07:52:37 +0000 | [diff] [blame] | 155 | static ARMConstantPoolConstant *Create(const Constant *C, unsigned ID, |
| 156 | ARMCP::ARMCPKind Kind, |
| 157 | unsigned char PCAdj, |
| 158 | ARMCP::ARMCPModifier Modifier, |
| 159 | bool AddCurrentAddress); |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 160 | |
| 161 | const GlobalValue *getGV() const; |
Bill Wendling | f117a35 | 2011-10-01 07:52:37 +0000 | [diff] [blame] | 162 | const BlockAddress *getBlockAddress() const; |
| 163 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 164 | int getExistingMachineCPValue(MachineConstantPool *CP, |
| 165 | unsigned Alignment) override; |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 166 | |
| 167 | /// hasSameValue - Return true if this ARM constpool value can share the same |
| 168 | /// constantpool entry as another ARM constpool value. |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 169 | bool hasSameValue(ARMConstantPoolValue *ACPV) override; |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 170 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 171 | void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 172 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 173 | void print(raw_ostream &O) const override; |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 174 | static bool classof(const ARMConstantPoolValue *APV) { |
| 175 | return APV->isGlobalValue() || APV->isBlockAddress() || APV->isLSDA(); |
| 176 | } |
Benjamin Kramer | 2ef689c | 2013-09-16 10:17:31 +0000 | [diff] [blame] | 177 | |
| 178 | bool equals(const ARMConstantPoolConstant *A) const { |
| 179 | return CVal == A->CVal && ARMConstantPoolValue::equals(A); |
| 180 | } |
Bill Wendling | 396c211 | 2011-10-01 06:40:33 +0000 | [diff] [blame] | 181 | }; |
| 182 | |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 183 | /// ARMConstantPoolSymbol - ARM-specific constantpool values for external |
| 184 | /// symbols. |
| 185 | class ARMConstantPoolSymbol : public ARMConstantPoolValue { |
Benjamin Kramer | 9d46110 | 2012-12-24 19:23:30 +0000 | [diff] [blame] | 186 | const std::string S; // ExtSymbol being loaded. |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 187 | |
| 188 | ARMConstantPoolSymbol(LLVMContext &C, const char *s, unsigned id, |
| 189 | unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, |
| 190 | bool AddCurrentAddress); |
| 191 | |
| 192 | public: |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 193 | static ARMConstantPoolSymbol *Create(LLVMContext &C, const char *s, |
Bill Wendling | c214cb0 | 2011-10-01 08:58:29 +0000 | [diff] [blame] | 194 | unsigned ID, unsigned char PCAdj); |
| 195 | |
Benjamin Kramer | 9d46110 | 2012-12-24 19:23:30 +0000 | [diff] [blame] | 196 | const char *getSymbol() const { return S.c_str(); } |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 197 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 198 | int getExistingMachineCPValue(MachineConstantPool *CP, |
| 199 | unsigned Alignment) override; |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 200 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 201 | void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 202 | |
| 203 | /// hasSameValue - Return true if this ARM constpool value can share the same |
| 204 | /// constantpool entry as another ARM constpool value. |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 205 | bool hasSameValue(ARMConstantPoolValue *ACPV) override; |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 206 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 207 | void print(raw_ostream &O) const override; |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 208 | |
| 209 | static bool classof(const ARMConstantPoolValue *ACPV) { |
| 210 | return ACPV->isExtSymbol(); |
| 211 | } |
Benjamin Kramer | 2ef689c | 2013-09-16 10:17:31 +0000 | [diff] [blame] | 212 | |
| 213 | bool equals(const ARMConstantPoolSymbol *A) const { |
| 214 | return S == A->S && ARMConstantPoolValue::equals(A); |
| 215 | } |
Bill Wendling | d7fa016 | 2011-10-01 08:36:59 +0000 | [diff] [blame] | 216 | }; |
| 217 | |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 218 | /// ARMConstantPoolMBB - ARM-specific constantpool value of a machine basic |
| 219 | /// block. |
| 220 | class ARMConstantPoolMBB : public ARMConstantPoolValue { |
Bill Wendling | 4a4772f | 2011-10-01 09:30:42 +0000 | [diff] [blame] | 221 | const MachineBasicBlock *MBB; // Machine basic block. |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 222 | |
Bill Wendling | 4a4772f | 2011-10-01 09:30:42 +0000 | [diff] [blame] | 223 | ARMConstantPoolMBB(LLVMContext &C, const MachineBasicBlock *mbb, unsigned id, |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 224 | unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, |
| 225 | bool AddCurrentAddress); |
| 226 | |
| 227 | public: |
Bill Wendling | 4a4772f | 2011-10-01 09:30:42 +0000 | [diff] [blame] | 228 | static ARMConstantPoolMBB *Create(LLVMContext &C, |
| 229 | const MachineBasicBlock *mbb, |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 230 | unsigned ID, unsigned char PCAdj); |
| 231 | |
| 232 | const MachineBasicBlock *getMBB() const { return MBB; } |
| 233 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 234 | int getExistingMachineCPValue(MachineConstantPool *CP, |
| 235 | unsigned Alignment) override; |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 236 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 237 | void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 238 | |
| 239 | /// hasSameValue - Return true if this ARM constpool value can share the same |
| 240 | /// constantpool entry as another ARM constpool value. |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 241 | bool hasSameValue(ARMConstantPoolValue *ACPV) override; |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 242 | |
Craig Topper | 6bc27bf | 2014-03-10 02:09:33 +0000 | [diff] [blame] | 243 | void print(raw_ostream &O) const override; |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 244 | |
| 245 | static bool classof(const ARMConstantPoolValue *ACPV) { |
| 246 | return ACPV->isMachineBasicBlock(); |
| 247 | } |
Benjamin Kramer | 2ef689c | 2013-09-16 10:17:31 +0000 | [diff] [blame] | 248 | |
| 249 | bool equals(const ARMConstantPoolMBB *A) const { |
| 250 | return MBB == A->MBB && ARMConstantPoolValue::equals(A); |
| 251 | } |
Bill Wendling | 6dbc9fe | 2011-10-01 09:19:10 +0000 | [diff] [blame] | 252 | }; |
| 253 | |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 254 | } // End llvm namespace |
Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 255 | |
| 256 | #endif |