mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
Inline MachineRegisterInfo::hasOneUse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5eb301740c
commit
269120cd9b
@ -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…
x
Reference in New Issue
Block a user