Skip to content

Commit fada230

Browse files
committed
[BOLT][NFC] Return MCRegister::NoRegister from MCPlusBuilder::getNoRegister()
Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D120863
1 parent 4212a57 commit fada230

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,7 @@ class MCPlusBuilder {
424424

425425
/// Return a register number that is guaranteed to not match with
426426
/// any real register on the underlying architecture.
427-
virtual MCPhysReg getNoRegister() const {
428-
llvm_unreachable("not implemented");
429-
}
427+
MCPhysReg getNoRegister() const { return MCRegister::NoRegister; }
430428

431429
/// Return a register corresponding to a function integer argument \p ArgNo
432430
/// if the argument is passed in a register. Or return the result of

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
204204
return Inst.getOpcode() == AArch64::BLR;
205205
}
206206

207-
MCPhysReg getNoRegister() const override { return AArch64::NoRegister; }
208-
209207
bool hasPCRelOperand(const MCInst &Inst) const override {
210208
// ADRP is blacklisted and is an exception. Even though it has a
211209
// PC-relative operand, this operand is not a complete symbol reference

bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3202,8 +3202,6 @@ class X86MCPlusBuilder : public MCPlusBuilder {
32023202

32033203
MCPhysReg getX86R11() const override { return X86::R11; }
32043204

3205-
MCPhysReg getNoRegister() const override { return X86::NoRegister; }
3206-
32073205
MCPhysReg getIntArgRegister(unsigned ArgNo) const override {
32083206
// FIXME: this should depend on the calling convention.
32093207
switch (ArgNo) {

0 commit comments

Comments
 (0)