@@ -26,23 +26,16 @@ class LLVMContext;
2626namespace RISCVCP {
2727
2828enum RISCVCPKind { ExtSymbol, GlobalValue, BlockAddress };
29-
30- enum RISCVCPModifier {
31- None,
32- };
3329} // end namespace RISCVCP
3430
3531// / A RISCV-specific constant pool value.
3632class RISCVConstantPoolValue : public MachineConstantPoolValue {
3733 RISCVCP::RISCVCPKind Kind;
38- RISCVCP::RISCVCPModifier Modifier;
3934
4035protected:
41- RISCVConstantPoolValue (LLVMContext &C, RISCVCP::RISCVCPKind Kind,
42- RISCVCP::RISCVCPModifier Modifier);
36+ RISCVConstantPoolValue (LLVMContext &C, RISCVCP::RISCVCPKind Kind);
4337
44- RISCVConstantPoolValue (Type *Ty, RISCVCP::RISCVCPKind Kind,
45- RISCVCP::RISCVCPModifier Modifier);
38+ RISCVConstantPoolValue (Type *Ty, RISCVCP::RISCVCPKind Kind);
4639
4740 template <typename Derived>
4841 int getExistingMachineCPValueImpl (MachineConstantPool *CP, Align Alignment) {
@@ -64,10 +57,6 @@ class RISCVConstantPoolValue : public MachineConstantPoolValue {
6457public:
6558 ~RISCVConstantPoolValue () = default ;
6659
67- RISCVCP::RISCVCPModifier getModifier () const { return Modifier; }
68- StringRef getModifierText () const ;
69- bool hasModifier () const { return Modifier != RISCVCP::None; }
70-
7160 bool isExtSymbol () const { return Kind == RISCVCP::ExtSymbol; }
7261 bool isGlobalValue () const { return Kind == RISCVCP::GlobalValue; }
7362 bool isBlockAddress () const { return Kind == RISCVCP::BlockAddress; }
@@ -76,12 +65,6 @@ class RISCVConstantPoolValue : public MachineConstantPoolValue {
7665 Align Alignment) override ;
7766
7867 void addSelectionDAGCSEId (FoldingSetNodeID &ID) override {}
79-
80- bool equals (const RISCVConstantPoolValue *A) const {
81- return this ->Modifier == A->Modifier ;
82- }
83-
84- void print (raw_ostream &O) const override ;
8568};
8669
8770class RISCVConstantPoolConstant : public RISCVConstantPoolValue {
@@ -107,7 +90,7 @@ class RISCVConstantPoolConstant : public RISCVConstantPoolValue {
10790 void print (raw_ostream &O) const override ;
10891
10992 bool equals (const RISCVConstantPoolConstant *A) const {
110- return CVal == A->CVal && RISCVConstantPoolValue::equals (A) ;
93+ return CVal == A->CVal ;
11194 }
11295
11396 static bool classof (const RISCVConstantPoolValue *RCPV) {
@@ -118,12 +101,10 @@ class RISCVConstantPoolConstant : public RISCVConstantPoolValue {
118101class RISCVConstantPoolSymbol : public RISCVConstantPoolValue {
119102 const std::string S;
120103
121- RISCVConstantPoolSymbol (LLVMContext &C, StringRef s,
122- RISCVCP::RISCVCPModifier Modifier);
104+ RISCVConstantPoolSymbol (LLVMContext &C, StringRef s);
123105
124106public:
125- static RISCVConstantPoolSymbol *Create (LLVMContext &C, StringRef s,
126- RISCVCP ::RISCVCPModifier Modifier);
107+ static RISCVConstantPoolSymbol *Create (LLVMContext &C, StringRef s);
127108
128109 std::string getSymbol () const { return S; }
129110
@@ -135,7 +116,7 @@ class RISCVConstantPoolSymbol : public RISCVConstantPoolValue {
135116 void print (raw_ostream &O) const override ;
136117
137118 bool equals (const RISCVConstantPoolSymbol *A) const {
138- return S == A->S && RISCVConstantPoolValue::equals (A) ;
119+ return S == A->S ;
139120 }
140121 static bool classof (const RISCVConstantPoolValue *RCPV) {
141122 return RCPV->isExtSymbol ();
0 commit comments