From: Matt Arsenault Date: Tue, 8 Sep 2015 20:21:29 +0000 (+0000) Subject: Add const overload of findRegisterUseOperand X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=55478a8b796b9645781341ab1209dd4ac623d79b;p=oota-llvm.git Add const overload of findRegisterUseOperand git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247063 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 8c0b567c708..b6c26ce1969 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -903,6 +903,13 @@ public: return (Idx == -1) ? nullptr : &getOperand(Idx); } + const MachineOperand *findRegisterUseOperand( + unsigned Reg, bool isKill = false, + const TargetRegisterInfo *TRI = nullptr) const { + return const_cast(this)-> + findRegisterUseOperand(Reg, isKill, TRI); + } + /// Returns the operand index that is a def of the specified register or /// -1 if it is not found. If isDead is true, defs that are not dead are /// skipped. If Overlap is true, then it also looks for defs that merely