Optimizer rules that combine shifts and masks.

This commit is contained in:
chriseth
2019-05-15 20:30:53 +02:00
parent 66cea5abb6
commit f6437a2016
10 changed files with 166 additions and 40 deletions
-6
View File
@@ -188,12 +188,6 @@ inline bytes toCompactBigEndian(uint8_t _val, unsigned _min = 0)
return (_min || _val) ? bytes{ _val } : bytes{};
}
/// Workarounds shift left bug in boost <1.65.1.
template <class S> S bigintShiftLeftWorkaround(S const& _a, unsigned _b)
{
return (S)(bigint(_a) << _b);
}
/// Convenience function for conversion of a u256 to hex
inline std::string toHex(u256 val, HexPrefix prefix = HexPrefix::DontAdd)
{