mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
Remove assertions from the SmallVector class. They slow down clients of
smallvector too much in a release build. Removing them speeds up isel 4%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51a4911121
commit
d0337c1678
@ -15,7 +15,6 @@
|
||||
#define LLVM_ADT_SMALLVECTOR_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
|
||||
@ -91,20 +90,16 @@ public:
|
||||
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 @@ public:
|
||||
}
|
||||
|
||||
void pop_back() {
|
||||
assert(!empty() && "SmallVector is empty!");
|
||||
--End;
|
||||
End->~T();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user