mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Added MachineRegisterInfo::hasOneDef()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
269120cd9b
commit
0492a8c530
@ -172,6 +172,15 @@ public:
|
||||
/// specified register (it may be live-in).
|
||||
bool def_empty(unsigned RegNo) const { return def_begin(RegNo) == def_end(); }
|
||||
|
||||
/// hasOneDef - Return true if there is exactly one instruction defining the
|
||||
/// specified register.
|
||||
bool hasOneDef(unsigned RegNo) const {
|
||||
def_iterator DI = def_begin(RegNo);
|
||||
if (DI == def_end())
|
||||
return false;
|
||||
return ++DI == def_end();
|
||||
}
|
||||
|
||||
/// use_iterator/use_begin/use_end - Walk all uses of the specified register.
|
||||
typedef defusechain_iterator<true,false,false> use_iterator;
|
||||
use_iterator use_begin(unsigned RegNo) const {
|
||||
|
Loading…
Reference in New Issue
Block a user