aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-14 15:37:25 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-14 15:37:25 +0000
commit9e10d773e155fcd9fba9c3e1a7d2e49f31c42731 (patch)
tree35ea8748ec2cf2883fde3df52eb98e35a08e3cf6
parentf402602199a3fc875bb9b6887869e647d0b49df2 (diff)
Remove BitVector binops.
These operators were crazy slow, calling malloc to return a temporary result. At the same time, they look very innocent when used in code. If you need temporary BitVectors to compute your thing, create them explicitly, and use the inplace logical operators. This makes the high cost explicit in the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156767 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/BitVector.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index bf6d76fbcc..23aad6e119 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -482,24 +482,6 @@ private:
}
};
-inline BitVector operator&(const BitVector &LHS, const BitVector &RHS) {
- BitVector Result(LHS);
- Result &= RHS;
- return Result;
-}
-
-inline BitVector operator|(const BitVector &LHS, const BitVector &RHS) {
- BitVector Result(LHS);
- Result |= RHS;
- return Result;
-}
-
-inline BitVector operator^(const BitVector &LHS, const BitVector &RHS) {
- BitVector Result(LHS);
- Result ^= RHS;
- return Result;
-}
-
} // End llvm namespace
namespace std {