[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h

Chris Lattner lattner at cs.uiuc.edu
Wed Feb 18 10:47:02 PST 2004


Changes in directory llvm/include/llvm/CodeGen:

MachineBasicBlock.h updated: 1.19 -> 1.20

---
Log message:

eliminate a pair of really inefficient methods now that noone uses them


---
Diffs of the changes:  (+0 -21)

Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.19 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.20
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.19	Mon Feb 16 01:17:43 2004
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h	Wed Feb 18 10:45:22 2004
@@ -79,12 +79,6 @@
   unsigned size() const { return Insts.size(); }
   bool empty() const { return Insts.empty(); }
 
-  // This is a really inefficient way of accessing a basic
-  // block. These methods will be removed when all of their uses are
-  // eliminated.
-  inline const MachineInstr& operator[](unsigned i) const DEPRECATED;
-  inline MachineInstr& operator[](unsigned i) DEPRECATED;
-
   MachineInstr& front() { return Insts.front(); }
   MachineInstr& back()  { return Insts.back(); }
 
@@ -121,21 +115,6 @@
   void setPrev(MachineBasicBlock *P) { Prev = P; }
   void setNext(MachineBasicBlock *N) { Next = N; }
 };
-
-const MachineInstr& MachineBasicBlock::operator[](unsigned i) const
-{
-  const_iterator it = Insts.begin();
-  std::advance(it, i);
-  return *it;
-}
-
-MachineInstr& MachineBasicBlock::operator[](unsigned i)
-{
-  iterator it = Insts.begin();
-  std::advance(it, i);
-  return *it;
-}
-
 
 } // End llvm namespace
 





More information about the llvm-commits mailing list