[llvm-commits] [llvm] r103856 - /llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri May 14 19:52:58 PDT 2010
Author: stoklund
Date: Fri May 14 21:52:58 2010
New Revision: 103856
URL: http://llvm.org/viewvc/llvm-project?rev=103856&view=rev
Log:
Add reg_nodbg_iterator
Modified:
llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h?rev=103856&r1=103855&r2=103856&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Fri May 14 21:52:58 2010
@@ -93,6 +93,20 @@
/// specified register (it may be live-in).
bool reg_empty(unsigned RegNo) const { return reg_begin(RegNo) == reg_end(); }
+ /// reg_nodbg_iterator/reg_nodbg_begin/reg_nodbg_end - Walk all defs and uses
+ /// of the specified register, skipping those marked as Debug.
+ typedef defusechain_iterator<true,true,true> reg_nodbg_iterator;
+ reg_nodbg_iterator reg_nodbg_begin(unsigned RegNo) const {
+ return reg_nodbg_iterator(getRegUseDefListHead(RegNo));
+ }
+ static reg_nodbg_iterator reg_nodbg_end() { return reg_nodbg_iterator(0); }
+
+ /// reg_nodbg_empty - Return true if the only instructions using or defining
+ /// Reg are Debug instructions.
+ bool reg_nodbg_empty(unsigned RegNo) const {
+ return reg_nodbg_begin(RegNo) == reg_nodbg_end();
+ }
+
/// def_iterator/def_begin/def_end - Walk all defs of the specified register.
typedef defusechain_iterator<false,true,false> def_iterator;
def_iterator def_begin(unsigned RegNo) const {
More information about the llvm-commits
mailing list