aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-06-18 07:47:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-06-18 07:47:55 +0000
commit6e062a45858586d1a522c0aeaf8c77446db101db (patch)
tree65caf4652489b33b517e5e520621bfe5cb5eee2f
parente3c4f5387879d7287bc6f5ffaf7f07542b360df9 (diff)
downloadexternal_llvm-6e062a45858586d1a522c0aeaf8c77446db101db.zip
external_llvm-6e062a45858586d1a522c0aeaf8c77446db101db.tar.gz
external_llvm-6e062a45858586d1a522c0aeaf8c77446db101db.tar.bz2
Add MachineRegisterInfo::use_empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52451 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index f5fda9b..b93794c 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -90,6 +90,10 @@ public:
}
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),