mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -116,6 +116,19 @@ MachineInstr *MachineRegisterInfo::getVRegDef(unsigned Reg) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
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())
|
||||
return false;
|
||||
return ++UI == use_nodbg_end();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
void MachineRegisterInfo::dumpUses(unsigned Reg) const {
|
||||
|
||||
Reference in New Issue
Block a user