Commit Graph
248 Commits
Author SHA1 Message Date
Nikola Matic fdc6699159 Rematerialize zero literals with default cleanup sequence
Add unused pruner step to the end of the default cleanup sequence
2023-09-04 15:40:33 +02:00
Daniel Kirchner aaba5c408a Remove obsolete main function yul optimiser step. 2023-08-16 17:28:32 +02:00
Nikola Matic 96e7b4f46b Rematerialize zero literals 2023-08-07 17:33:16 +02:00
Kamil Śliwak ba3f9dd2a2 FullInliner: Do not include calls whose arguments may have side-effects 2023-07-17 16:40:43 +02:00
Kamil Śliwak 5e1e0e7752 FullInliner: Fix order of arguments of inlined functions 2023-07-17 16:40:43 +02:00
Kamil Śliwak a07f6c443a Tests for Yul argument evaluation order after optimization 2023-07-17 16:40:43 +02:00
Kamil Śliwak edceb4d2d1 Allow testing FullInliner without ExpressionSplitter 2023-07-17 16:40:43 +02:00
Martin Blicha 29041c8101 Remove ReasoningBasedSimplifier from libyul
Due to a design decision to move away from a bundled SMT solver,
ReasoningBasedSimplifier in its current form cannot be use any longer.
This is a necessary step to allow a unified way to call solvers using
only SMTLIB interface.

Since this optimization pass has always been marked as highly
experimental and never turned on by default, it should be OK to remove
it.
2023-06-28 14:38:36 +02:00
Daniel Kirchner b7abd9bba4 Deterministically choose memory slots for variables independently of names that may depend on AST IDs. 2023-06-12 17:28:01 +02:00
Alexander Arlt c5673278a7 Remove EWASM backend. 2023-05-11 10:56:55 -05:00
chriseth fac5666dc9 Re-implement unused assign / unused store eliminator. 2023-03-20 13:49:37 +01:00
Bhargava Shastry 5c6e12b2c0 Update existing and add new test cases. 2023-02-02 11:40:39 +01:00
chriseth 79c52b3c9e Re-use knowledge about keccak calls.
Re-use knowledge about keccak calls.

Update gas cost.

More tests.

Fix bug.

Update libyul/optimiser/DataFlowAnalyzer.cpp

Remove util prefixes

fix test

More test cases.

Add Changelog entry
2022-12-07 14:16:13 +01:00
nishant-sachdeva efbd3666a7 added optimization. shl comes out from being distributed over and 2022-11-11 01:16:14 +05:30
chriseth cffacac9de Hash number literals according to their value instead of their string representation. 2022-11-08 20:34:10 +01:00
Daniel KirchnerandKamil Śliwak a33da17300 Bugfix and tests.
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2022-09-08 11:54:14 +02:00
Daniel Kirchner d5e2925326 broken yul optimizer test 2022-09-07 16:49:58 +02:00
Daniel Kirchner e996fe6247 Yul Optimizer: Simplify start offset of zero-length operations. 2022-08-15 15:42:51 +02:00
Daniel Lupu 8c5f5c7db0 add rules for mod(mul(X, Y), A) & mod(add(X, Y), A) 2022-06-22 09:26:09 +02:00
Kamil Śliwak f08d349791 Separate some inlining tests into pre- and post-homestead 2022-05-23 13:37:50 +02:00
Daniel Kirchner 9fa907aac2 Do not remove potentially reverting returndatacopy cases. 2022-05-23 11:01:03 +02:00
chriseth 75abe92eb2 Refactor stack compressor. 2022-03-15 21:28:47 +01:00
chriseth 4f02be110c Unused store eliminator. 2022-03-10 18:25:28 +01:00
hrkrshnn 85d1a57e65 Added more tests. Updated chromosome. Remove unused headers. 2022-01-04 13:27:39 +05:30
chriseth e7fc2a176a Test updates. 2022-01-03 15:52:05 +01:00
chriseth 772e100813 Equal store eliminator. 2022-01-03 15:52:05 +01:00
chriseth 0e7a065a78 Enhance documentation. 2021-11-23 14:58:04 +01:00
chriseth bd321b9f1f Rename RedundantAssignEliminator to UnusedAssignEliminator. 2021-11-23 10:38:36 +01:00
Daniel Kirchner 10618188dd Update tests. 2021-11-09 14:34:05 +01:00
Daniel Kirchner 1a0605c594 Update tests. 2021-11-03 12:39:55 +01:00
chriseth 7f7c5ca171 New tests. 2021-11-02 11:59:01 +01:00
chriseth 3996d0a343 Update tests. 2021-11-02 11:59:01 +01:00
chriseth 95dbbdae22 Prepare tests to be meaningful. 2021-10-13 17:56:43 +02:00
Daniel Kirchner c499f27a63 Change RematCandidateSelector to not depend on variable name sorting. 2021-09-08 15:41:40 +02:00
hrkrshnn 2cdd3b2081 Resolving Keccak-256: check if arguments are identifiers early.
Previously, the check on whether the optimization was useful gas wise was done before checking if
the keccak256 opcode had identifier as arguments. Since the gas meter crashes when encountering
certain Yul opcodes (create, dataoffset, etc.), this optimizer step crashed.
2021-09-06 13:48:07 +02:00
chriseth 4480662a58 Test. 2021-08-16 18:54:33 +02:00
Daniel Kirchner c341445f8e Maintain disambiguation when generating new functions in StackToMemoryMover. 2021-06-28 18:11:57 +02:00
Daniel Kirchner dfce7b667d Move function arguments and return values. 2021-06-28 18:11:57 +02:00
Daniel Kirchner 284e8a103f Remove potentially non-deterministic test case. 2021-06-09 14:42:16 +02:00
hrkrshnn 8b4eaeabbf Added a few optimizer tests for Verbatim 2021-04-28 09:56:45 +02:00
Harikrishnan Mulackal f162c484ca Merge pull request #11026 from ethereum/resolve-keccak
Evaluate ``keccak256(a, const)``, when the value at memory location ``a`` is known at compile time and ``const <= 32``
2021-04-22 19:18:19 +02:00
hrkrshnn b599235b8d Skip resolving Keccak if AST contains msize.
Also a refactoring changing `m_optimizeMLoad` to `m_containsMSize`.
2021-04-22 18:19:47 +02:00
hrkrshnn 221292c278 Tests and changelog 2021-04-22 18:19:47 +02:00
chriseth a6a3af58a0 Add test. 2021-04-22 17:23:56 +02:00
chriseth 00fb2d390b Do not replace zeros by return variable. 2021-04-22 16:54:02 +02:00
hrkrshnn 0100f48e05 FunctionSpecializer: skip specializing recursive functions
This avoids potential pathological behaviour, like in Ackermann function.
2021-03-29 11:02:31 +02:00
hrkrshnn 2c75d1dfe4 Isoltest gas update for FunctionSpecializer 2021-03-29 11:02:31 +02:00
hrkrshnn 09998ceb0c Tests for FunctionSpecializer 2021-03-29 11:02:18 +02:00
chriseth 2c8540b1f9 Yul optimizer test updates. 2021-03-18 08:42:49 +01:00
chriseth 40c27ccc22 Move AND with constant inside OR. 2021-03-09 15:26:19 +01:00