diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-13 16:55:37 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-13 16:55:37 +0000 |
| commit | 6b1b1e4358c682ebb3e0ad81244ad0378b7100a2 (patch) | |
| tree | 1b6e41b38cb2d29494bb79b2b29f74c2a108e31e /llvm/lib/CodeGen/MachineRegisterInfo.cpp | |
| parent | a1cf9fef706b12fc128f431bc184de1cb05c318a (diff) | |
| download | bcm5719-llvm-6b1b1e4358c682ebb3e0ad81244ad0378b7100a2.tar.gz bcm5719-llvm-6b1b1e4358c682ebb3e0ad81244ad0378b7100a2.zip | |
Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
llvm-svn: 101145
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineRegisterInfo.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp index d9ab6773a53..8523c3648d5 100644 --- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp +++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp @@ -130,6 +130,20 @@ bool MachineRegisterInfo::hasOneNonDBGUse(unsigned RegNo) const { return ++UI == use_nodbg_end(); } +bool MachineRegisterInfo::isLiveIn(unsigned Reg) const { + for (livein_iterator I = livein_begin(), E = livein_end(); I != E; ++I) + if (I->first == Reg || I->second == Reg) + return true; + return false; +} + +bool MachineRegisterInfo::isLiveOut(unsigned Reg) const { + for (liveout_iterator I = liveout_begin(), E = liveout_end(); I != E; ++I) + if (*I == Reg) + return true; + return false; +} + #ifndef NDEBUG void MachineRegisterInfo::dumpUses(unsigned Reg) const { for (use_iterator I = use_begin(Reg), E = use_end(); I != E; ++I) |

