forked from OSchip/llvm-project
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
This commit is contained in:
parent
572c5b2a44
commit
76680e9b4e
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue