Skip to content

Commit f99398f

Browse files
committed
[BOLT][NFC] Move isADD64rr and isADDri out of MCPlusBuilder class
Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D123077
1 parent 6302a91 commit f99398f

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,6 @@ class MCPlusBuilder {
511511
return 0;
512512
}
513513

514-
virtual bool isADD64rr(const MCInst &Inst) const {
515-
llvm_unreachable("not implemented");
516-
return false;
517-
}
518-
519514
virtual bool isSUB(const MCInst &Inst) const {
520515
llvm_unreachable("not implemented");
521516
return false;

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,6 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
11031103

11041104
bool isMoveMem2Reg(const MCInst &Inst) const override { return false; }
11051105

1106-
bool isADD64rr(const MCInst &Inst) const override { return false; }
1107-
11081106
bool isLeave(const MCInst &Inst) const override { return false; }
11091107

11101108
bool isPop(const MCInst &Inst) const override { return false; }

bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ bool isMOVSX64rm32(const MCInst &Inst) {
6868
return Inst.getOpcode() == X86::MOVSX64rm32;
6969
}
7070

71+
bool isADD64rr(const MCInst &Inst) { return Inst.getOpcode() == X86::ADD64rr; }
72+
73+
bool isADDri(const MCInst &Inst) {
74+
return Inst.getOpcode() == X86::ADD64ri32 ||
75+
Inst.getOpcode() == X86::ADD64ri8;
76+
}
77+
7178
class X86MCPlusBuilder : public MCPlusBuilder {
7279
public:
7380
X86MCPlusBuilder(const MCInstrAnalysis *Analysis, const MCInstrInfo *Info,
@@ -292,19 +299,10 @@ class X86MCPlusBuilder : public MCPlusBuilder {
292299
return 0;
293300
}
294301

295-
bool isADD64rr(const MCInst &Inst) const override {
296-
return Inst.getOpcode() == X86::ADD64rr;
297-
}
298-
299302
bool isSUB(const MCInst &Inst) const override {
300303
return X86::isSUB(Inst.getOpcode());
301304
}
302305

303-
bool isADDri(const MCInst &Inst) const {
304-
return Inst.getOpcode() == X86::ADD64ri32 ||
305-
Inst.getOpcode() == X86::ADD64ri8;
306-
}
307-
308306
bool isLEA64r(const MCInst &Inst) const override {
309307
return Inst.getOpcode() == X86::LEA64r;
310308
}

0 commit comments

Comments
 (0)