[llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 7 16:42:15 PDT 2006
Changes in directory llvm/include/llvm/ADT:
SmallVector.h updated: 1.5 -> 1.6
---
Log message:
Remove assertions from the SmallVector class. They slow down clients of
smallvector too much in a release build. Removing them speeds up isel 4%.
---
Diffs of the changes: (+0 -6)
SmallVector.h | 6 ------
1 files changed, 6 deletions(-)
Index: llvm/include/llvm/ADT/SmallVector.h
diff -u llvm/include/llvm/ADT/SmallVector.h:1.5 llvm/include/llvm/ADT/SmallVector.h:1.6
--- llvm/include/llvm/ADT/SmallVector.h:1.5 Mon Aug 7 00:45:34 2006
+++ llvm/include/llvm/ADT/SmallVector.h Mon Aug 7 18:41:59 2006
@@ -15,7 +15,6 @@
#define LLVM_ADT_SMALLVECTOR_H
#include <algorithm>
-#include <cassert>
#include <iterator>
#include <memory>
@@ -91,20 +90,16 @@
const_iterator end() const { return End; }
reference operator[](unsigned idx) {
- assert(idx < size() && "out of range reference!");
return Begin[idx];
}
const_reference operator[](unsigned idx) const {
- assert(idx < size() && "out of range reference!");
return Begin[idx];
}
reference back() {
- assert(!empty() && "SmallVector is empty!");
return end()[-1];
}
const_reference back() const {
- assert(!empty() && "SmallVector is empty!");
return end()[-1];
}
@@ -120,7 +115,6 @@
}
void pop_back() {
- assert(!empty() && "SmallVector is empty!");
--End;
End->~T();
}
More information about the llvm-commits
mailing list