mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
f402602199
commit
9e10d773e1
@ -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
Block a user