From 9e66eb6046fb294ce944ff65d29592804c97c9a1 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 17 Feb 2007 11:07:41 +0000 Subject: [PATCH] Added removeLiveIn and more livein iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34378 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineBasicBlock.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 142f8d8fa6f..661430c4807 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -138,11 +138,18 @@ public: /// is an error to add the same register to the same set more than once. void addLiveIn(unsigned Reg) { LiveIns.push_back(Reg); } + /// removeLiveIn - Remove the specified register from the live in set. + /// + void removeLiveIn(unsigned Reg); + // Iteration support for live in sets. These sets are kept in sorted // order by their register number. - typedef std::vector::const_iterator livein_iterator; - livein_iterator livein_begin() const { return LiveIns.begin(); } - livein_iterator livein_end() const { return LiveIns.end(); } + typedef std::vector::iterator livein_iterator; + typedef std::vector::const_iterator const_livein_iterator; + livein_iterator livein_begin() { return LiveIns.begin(); } + const_livein_iterator livein_begin() const { return LiveIns.begin(); } + livein_iterator livein_end() { return LiveIns.end(); } + const_livein_iterator livein_end() const { return LiveIns.end(); } bool livein_empty() const { return LiveIns.empty(); } // Code Layout methods.