[llvm-commits] [llvm] r52451 - /llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
Evan Cheng
evan.cheng at apple.com
Wed Jun 18 00:47:55 PDT 2008
Author: evancheng
Date: Wed Jun 18 02:47:55 2008
New Revision: 52451
URL: http://llvm.org/viewvc/llvm-project?rev=52451&view=rev
Log:
Add MachineRegisterInfo::use_empty.
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=52451&r1=52450&r2=52451&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Wed Jun 18 02:47:55 2008
@@ -90,6 +90,10 @@
}
static use_iterator use_end() { return use_iterator(0); }
+ /// use_empty - Return true if there are no instructions using the specified
+ /// register.
+ bool use_empty(unsigned RegNo) const { return use_begin(RegNo) == use_end(); }
+
/// replaceRegWith - Replace all instances of FromReg with ToReg in the
/// machine function. This is like llvm-level X->replaceAllUsesWith(Y),
More information about the llvm-commits
mailing list