diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-01 03:07:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-01 03:07:29 +0000 |
commit | a91a7d594ff1e1503731ca92f72e627bdfd18f3f (patch) | |
tree | 15c37e071b49da85dec69f1f307ecb9047ebdf1d /include | |
parent | 6c5757e4e85bb190097be13c1630bb107a1fbcfe (diff) | |
download | external_llvm-a91a7d594ff1e1503731ca92f72e627bdfd18f3f.zip external_llvm-a91a7d594ff1e1503731ca92f72e627bdfd18f3f.tar.gz external_llvm-a91a7d594ff1e1503731ca92f72e627bdfd18f3f.tar.bz2 |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 14d601f..45069a2 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 //===--------------------------------------------------------------------===// |