diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2008-06-18 07:47:55 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2008-06-18 07:47:55 +0000 |
| commit | 84da6318ca1d7414dfe59f813bc4c75e3fb9b9ac (patch) | |
| tree | 44c4c44c0391faebb0e1a5959e2644c5539363d0 | |
| parent | 50d59478da84cf465542fdf462ed5382326c7eef (diff) | |
| download | bcm5719-llvm-84da6318ca1d7414dfe59f813bc4c75e3fb9b9ac.tar.gz bcm5719-llvm-84da6318ca1d7414dfe59f813bc4c75e3fb9b9ac.zip | |
Add MachineRegisterInfo::use_empty.
llvm-svn: 52451
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineRegisterInfo.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h index f5fda9bfc02..b93794c1be2 100644 --- a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/llvm/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), |

