summaryrefslogtreecommitdiffstats
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
commit76680e9b4ec9e0ed019791373b726364e15dc322 (patch)
tree78d363de86cc2880d281dd6f11fbc7387a078e54
parent572c5b2a44f6d27f4311ac1ed9765a6a18d7b82d (diff)
downloadbcm5719-llvm-76680e9b4ec9e0ed019791373b726364e15dc322.tar.gz
bcm5719-llvm-76680e9b4ec9e0ed019791373b726364e15dc322.zip
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. llvm-svn: 156767
-rw-r--r--llvm/include/llvm/ADT/BitVector.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h
index bf6d76fbcc3..23aad6e119c 100644
--- a/llvm/include/llvm/ADT/BitVector.h
+++ b/llvm/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 {
OpenPOWER on IntegriCloud