mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 07:09:08 +00:00
Inline MachineRegisterInfo::hasOneUse
llvm-svn: 161007
This commit is contained in:
parent
54e2274160
commit
dc8c12f62b
@ -185,7 +185,12 @@ public:
|
||||
|
||||
/// hasOneUse - Return true if there is exactly one instruction using the
|
||||
/// specified register.
|
||||
bool hasOneUse(unsigned RegNo) const;
|
||||
bool hasOneUse(unsigned RegNo) const {
|
||||
use_iterator UI = use_begin(RegNo);
|
||||
if (UI == use_end())
|
||||
return false;
|
||||
return ++UI == use_end();
|
||||
}
|
||||
|
||||
/// use_nodbg_iterator/use_nodbg_begin/use_nodbg_end - Walk all uses of the
|
||||
/// specified register, skipping those marked as Debug.
|
||||
|
@ -178,13 +178,6 @@ MachineInstr *MachineRegisterInfo::getUniqueVRegDef(unsigned Reg) const {
|
||||
return &*I;
|
||||
}
|
||||
|
||||
bool MachineRegisterInfo::hasOneUse(unsigned RegNo) const {
|
||||
use_iterator UI = use_begin(RegNo);
|
||||
if (UI == use_end())
|
||||
return false;
|
||||
return ++UI == use_end();
|
||||
}
|
||||
|
||||
bool MachineRegisterInfo::hasOneNonDBGUse(unsigned RegNo) const {
|
||||
use_nodbg_iterator UI = use_nodbg_begin(RegNo);
|
||||
if (UI == use_nodbg_end())
|
||||
|
Loading…
Reference in New Issue
Block a user