Commit Graph

281 Commits

Author SHA1 Message Date
chriseth
633510eb04
Merge pull request #6935 from ethereum/subMaxValueXNotXRule
Add optimization rule SUB(~0, X) -> NOT(X).
2019-06-17 14:42:49 +02:00
Bhargava Shastry
e96003e709 optimizer: Remove redundant rule from the optimizer rule list 2019-06-17 13:41:48 +02:00
Daniel Kirchner
7f322c9433 Add optimization rule SUB(~0, X) -> NOT(X). 2019-06-14 14:07:46 +02:00
chriseth
afe887adc1 Split MovableChecker and introduce SideEffectsUpToMSize. 2019-05-28 12:54:32 +02:00
Alex Beregszaszi
5acd862b05 Document copyRoutine in ConstantOptimiser 2019-05-22 15:18:57 +01:00
chriseth
54ce3df321
Merge pull request #6755 from ethereum/useShiftDirectly
[Optimizer] Use shift directly instead of multiplication in constant optimizer.
2019-05-16 15:49:02 +02:00
chriseth
5824f5d42f Use shift directly instead of multiplication in constant optimizer. 2019-05-16 12:50:53 +02:00
chriseth
e8a88b13e4 Introduce side-effect-free as relaxed version of movable. 2019-05-16 12:30:05 +02:00
chriseth
f6437a2016 Optimizer rules that combine shifts and masks. 2019-05-15 20:30:53 +02:00
Daniel Kirchner
a5427bc63a Add optimizer rules for multiplication and division by left-shifted one. 2019-05-14 16:20:45 +02:00
chriseth
99e96c2d66 Refactor termination detection. 2019-05-13 18:58:36 +02:00
Mathias Baumann
e20acf5d0a Yul Optimizer: Remove dead code 2019-04-01 17:16:04 +02:00
Mathias Baumann
5c66ccc179 Optimize obsolete ANDs in combination with certain SHIFTs 2019-03-29 10:08:05 +01:00
Alex Beregszaszi
84fbf605aa Replace shifts by larger than 255 with 0 2019-03-29 10:07:54 +01:00
chriseth
30da62aa2c
Merge pull request #6408 from ethereum/includeCleanup
Include cleanup
2019-03-28 15:31:07 +01:00
chriseth
f2cee9ec0c Include cleanup. 2019-03-28 14:32:48 +01:00
chriseth
2308904f68 Remove "using namespace" from header and move Instruction to dev::eth. 2019-03-28 13:48:11 +01:00
Bhargava Shastry
f7b5a27581 Fixes bug in byte optimization rule and adds tests. 2019-03-21 14:29:06 +01:00
Mathias Baumann
6b60e90cde Fix commented debug output code 2019-03-19 16:15:05 +01:00
Alex Beregszaszi
f95388011b Allow simplification patterns to signal failure 2019-03-19 15:51:52 +01:00
chriseth
4c1a9aa273
Merge pull request #6256 from ethereum/completeLtGtRules
Complete the GT/LT rules.
2019-03-13 12:08:34 +01:00
chriseth
571f400a3e Complete the GT/LT rules. 2019-03-13 12:01:23 +01:00
Bhargava Shastry
515fa872c8 Fixes u256 overflow in logical shift optimization rule and adds tests. 2019-03-13 11:19:20 +01:00
chriseth
e0d1b2f5b3 Peephole optimizer for "iszero iszero <tag> jumpi". 2019-03-07 15:52:02 +01:00
chriseth
34082a2368
Merge pull request #6159 from ethereum/more-optims
More optimiser rules for LT/GT/AND/BYTE and address cleanups
2019-03-04 16:24:38 +01:00
Alex Beregszaszi
1272951bbb Do not mask with 160-bits after CREATE/CREATE2 2019-03-04 14:42:29 +01:00
Alex Beregszaszi
7aa2ee1775 More optimiser rules for LT/GT/AND/BYTE 2019-03-04 14:42:29 +01:00
Alex Beregszaszi
a7c2dba681 Document the boost multiprecision shift bug in RuleList 2019-03-04 13:37:20 +01:00
chriseth
851dd635eb Remove defaults in constructor arguments. 2019-03-04 11:41:52 +01:00
Alex Beregszaszi
cf5c13f9c7 Introduce global optimiser settings. 2019-03-04 11:40:28 +01:00
Alex Beregszaszi
4430fe6a54 Combine multiple shifts with constant shift-by values in the optimiser 2019-02-25 20:56:13 +00:00
chriseth
70bbdd8fac
Merge pull request #3464 from ethereum/iulia_interp
Yul interpreter
2019-02-25 15:38:41 +01:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
chriseth
cc88c517a2 Review changes. 2019-02-25 11:58:37 +01:00
Alex Beregszaszi
81d011335a Support shifts in the constant optimiser when Constantinople is targeted 2019-02-22 11:55:43 +00:00
chriseth
7f6f958246 Fix: Also replace tags in the list of tags referenced from outside. 2019-02-20 15:06:23 +01:00
Alex Beregszaszi
fd936439a4 Add more optimisation rules for shifts 2019-02-20 11:59:15 +00:00
Daniel Kirchner
809b9a95f9 Even more style checks. 2019-02-14 11:53:00 +01:00
Alex Beregszaszi
6b11be8c69 Mark apropriate methods protected in ConstantOptimiser 2019-02-05 19:40:34 +00:00
Alex Beregszaszi
ae1cd252b0 Take only Assembly instance as an input to ConstantOptimiser 2019-01-31 16:02:29 +00:00
Alex Beregszaszi
4aa2d965dc Remove once-off helper in ConstantOptimiser
For clarity. Makes code easier to understand.
2019-01-28 15:44:44 +00:00
Alex Beregszaszi
9d52325b29 Move ConstantOptimiser constructor to header 2019-01-28 11:20:46 +00:00
Daniel Kirchner
870b656eda Split up rule list generation further to prevent issues in browsers with the emscripten build. 2019-01-18 17:02:47 +01:00
chriseth
ef59f35a14
Merge pull request #5693 from ethereum/assemblyitem
Use explicit break and do not coerce 0 into bool in AssemblyItem
2018-12-19 15:14:49 +01:00
Alex Beregszaszi
517beb6fa6 Use explicit break and do not coerce 0 into bool in AssemblyItem 2018-12-19 12:35:00 +00:00
Christian Parpart
62fe57479e
make use of C++ = default constructor declarations as well as more non-static member initialization syntax. 2018-12-19 11:26:42 +01:00
chriseth
27e4e25a99 Optimize some instruction comparisons. 2018-12-18 17:25:49 +01:00
chriseth
01249984f2 Provide comparison shortcut. 2018-12-18 16:10:14 +01:00
chriseth
18efbb52c0 Use the move. 2018-12-18 16:10:14 +01:00
chriseth
68ad015714 Make swappable instructions static. 2018-12-18 12:39:24 +01:00