From a91a7d594ff1e1503731ca92f72e627bdfd18f3f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 1 Jan 2008 03:07:29 +0000 Subject: Add a trivial but handy function to efficiently return the machine instruction that defines the specified vreg. Crazy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45480 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineRegisterInfo.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 14d601f0bd..45069a2653 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -120,6 +120,12 @@ public: return VRegInfo.size()+MRegisterInfo::FirstVirtualRegister-1; } + /// getVRegDef - Return the machine instr that defines the specified virtual + /// register or null if none is found. This assumes that the code is in SSA + /// form, so there should only be one definition. + MachineInstr *getVRegDef(unsigned Reg) const; + + //===--------------------------------------------------------------------===// // Physical Register Use Info //===--------------------------------------------------------------------===// -- cgit v1.2.3-70-g09d2