aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineRegisterInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineRegisterInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index 01dc018..f2e5e10 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -115,6 +115,10 @@ public:
/// register.
bool use_empty(unsigned RegNo) const { return use_begin(RegNo) == use_end(); }
+ /// hasOneUse - Return true if there is exactly one instruction using the
+ /// specified register.
+ bool hasOneUse(unsigned RegNo) const;
+
/// use_nodbg_iterator/use_nodbg_begin/use_nodbg_end - Walk all uses of the
/// specified register, skipping those marked as Debug.
typedef defusechain_iterator<true,false,true> use_nodbg_iterator;
@@ -129,6 +133,10 @@ public:
return use_nodbg_begin(RegNo) == use_nodbg_end();
}
+ /// hasOneNonDBGUse - Return true if there is exactly one non-Debug
+ /// instruction using the specified register.
+ bool hasOneNonDBGUse(unsigned RegNo) const;
+
/// replaceRegWith - Replace all instances of FromReg with ToReg in the
/// machine function. This is like llvm-level X->replaceAllUsesWith(Y),
/// except that it also changes any definitions of the register as well.