diff options
author | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-10-31 14:48:32 +0100 |
---|---|---|
committer | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-10-31 15:34:49 +0100 |
commit | 57ee0435bd47f23f3939f402914c231b4f65ca5e (patch) | |
tree | b1a09511e8ebf15450eefbe30f85f6f2123a7abf /llvm/lib/Target/X86/X86InstrInfo.h | |
parent | 55314d323738e4a8c1890b6a6e5064e7f4e0da1c (diff) | |
download | bcm5719-llvm-57ee0435bd47f23f3939f402914c231b4f65ca5e.tar.gz bcm5719-llvm-57ee0435bd47f23f3939f402914c231b4f65ca5e.zip |
[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
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrInfo.h')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<DestSourcePair> + isCopyInstrImpl(const MachineInstr &MI) const override; private: /// This is a helper for convertToThreeAddress for 8 and 16-bit instructions. |