From 57ee0435bd47f23f3939f402914c231b4f65ca5e Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Thu, 31 Oct 2019 14:48:32 +0100 Subject: [TII] Use optional destination and source pair as a return value; NFC Refactor usage of isCopyInstrImpl, isCopyInstr and isAddImmediate methods to return optional machine operand pair of destination and source registers. Patch by Nikola Prica Differential Revision: https://reviews.llvm.org/D69622 --- llvm/lib/Target/X86/X86InstrInfo.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/X86/X86InstrInfo.h') diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index 22b7b1d4cb1..77043a59c8b 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -542,10 +542,10 @@ protected: unsigned CommuteOpIdx2) const override; /// If the specific machine instruction is a instruction that moves/copies - /// value from one register to another register return true along with - /// @Source machine operand and @Destination machine operand. - bool isCopyInstrImpl(const MachineInstr &MI, const MachineOperand *&Source, - const MachineOperand *&Destination) const override; + /// value from one register to another register return destination and source + /// registers as machine operands. + Optional + isCopyInstrImpl(const MachineInstr &MI) const override; private: /// This is a helper for convertToThreeAddress for 8 and 16-bit instructions. -- cgit v1.2.3