Commit Graph

135 Commits

Author SHA1 Message Date
Marenz
f7cc29bec1 Add std:: qualifier to move() calls 2022-08-30 11:12:15 +02:00
Daniel Kirchner
53c4facf4e Fix compilation error. 2022-06-15 11:14:50 +02:00
chriseth
4f02be110c Unused store eliminator. 2022-03-10 18:25:28 +01:00
Marenz
57d84c8bfb Fix genetic algorithms CI failure 2022-01-17 13:35:07 +01:00
chriseth
c16867cb83
Merge pull request #12272 from ethereum/equalStoreEliminator
Equal store eliminator.
2022-01-05 11:24:59 +01:00
Daniel Kirchner
671064b609 Use fixed seed for flaky phaser test for now. 2022-01-04 18:27:31 +01:00
hrkrshnn
85d1a57e65 Added more tests. Updated chromosome. Remove unused headers. 2022-01-04 13:27:39 +05:30
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
Kamil Śliwak
9a7c364c71 Process input files in Standard JSON mode just like in other modes
- This makes `-` for stdin work.
- `--ignore-missing` now works with `--standard-json`, though it's not very useful because there can be at most one input file.
- Separate errors for situations where there are no input files on the command line (this can be detected in the parser) and where they are not present on disk.
2021-07-27 15:54:32 +02:00
Kamil Śliwak
cdebbb0dbb TemporaryDirectory: Expose boost::filesystem::path in class interface 2021-05-12 18:08:17 +02:00
Kamil Śliwak
5619702d31 Extract TemporaryDirectory test helper from yulPhaser's tests into a more general location 2021-05-12 17:16:29 +02:00
hrkrshnn
09998ceb0c Tests for FunctionSpecializer 2021-03-29 11:02:18 +02:00
Alex Beregszaszi
7e88ba8da0 Enable the -Wconversion warning 2020-12-08 16:45:24 +00:00
chriseth
27e44b85e3
Merge pull request #10419 from ethereum/bug-namesimplifier
Fix a bug in NameSimplifier.
2020-12-03 17:52:40 +01:00
hrkrshnn
3efac3eef0 NameSimplifier is removed from steps available to users. 2020-12-02 13:48:01 +01:00
Alex Beregszaszi
a22077f736 Rename AsmData -> AST
Also attempt to only include ASTForward where appropriate.
2020-11-25 17:58:02 +00:00
chriseth
9bcc2f1713 Make ReasoningBasedSimplifier available as step. 2020-09-15 15:57:59 +02:00
Kamil Śliwak
ea1c249822 [yul-phaser] Chromosome: Use more samples and higher tolerance in tests checking the distribution
- This makes them run a second longer (which might seem small but it's a 3x increase).
- Hopefully they will break less when the random seed changes.
2020-09-14 16:17:39 +02:00
Kamil Śliwak
5637bdcaec [yul-phaser] Replace mutation tests with hard-coded expectations with more robust ones that check the statistical distribution
- The old tests would easily break when adding/removing optimiser steps.
2020-09-14 16:17:39 +02:00
Kamil Śliwak
d75f0ba437 [yul-phaser] Chromosome: Make it possible to use genes that do not correspond to existing optimiser steps 2020-09-14 16:17:39 +02:00
Kamil Śliwak
e024032a67 Revert "[yul-phaser] Temporarily disable very slow tests for the classic algorithm"
This reverts commit b23f7d8790.
2020-09-11 22:05:56 +02:00
Kamil Śliwak
952a9c6115 [yul-phaser] Chromosome: store step abbreviations instead of full names 2020-09-11 22:05:56 +02:00
Kamil Śliwak
2a707e7685 [yul-phaser] Chromosome: Add stepsToGenes() and genesToSteps() 2020-09-11 22:05:56 +02:00
chriseth
6101bdf7e2 Name simplifier. 2020-09-10 16:23:29 +02:00
Harikrishnan Mulackal
e2fd41f097 Implemented UnusedFunctionArgumentPruner 2020-09-03 13:15:38 +02:00
Sachin Grover
b7adb2aa42 Add SPDX license identifier if not present already in source file
Fixes: #9220
2020-07-17 20:24:12 +05:30
Djordje Mijovic
547590b972 Fixing additional signedness errors after adding -Wsign-conversion flag
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-07-09 17:22:45 +02:00
chriseth
83337c850e Do not run tests that do not need options multiple times. 2020-07-08 18:47:14 +02:00
Kamil Śliwak
b23f7d8790 [yul-phaser] Temporarily disable very slow tests for the classic algorithm 2020-07-07 17:14:57 +02:00
Djordje Mijovic
9b3d1c11ff yul-phaser: A few more tweaks to ensure that signedness conversions do not cause warnings
- Don't cast booleans to int when the result gets assigned to an unsigned type. Relace them with ifs.
- Use unsigned initializer for a variable declared in a lambda capture.
- Unsigned abs() of a difference of unsigned values.
2020-06-04 17:18:07 +02:00
Djordje Mijovic
a49a127627 yul-phaser: Use ptrdiff_t for iterator arithmetic 2020-06-04 17:17:40 +02:00
Kamil Śliwak
1fa689e951 [yul-phaser] ProgramCache::calculateTotalCachedCodeSize(): Replace default weights with ones that better correlate with memory usage 2020-05-20 16:47:23 +02:00
Kamil Śliwak
b776021870 [yul-phaser] Command-line options for altering weights used by CodeSize metric 2020-05-20 16:47:23 +02:00
Kamil Śliwak
40dfac7683 [yul-phaser] Require specifying weights for Program::codeSize() 2020-05-20 16:47:23 +02:00
Kamil Śliwak
d9e2735361 [yul-phaser] Add options for selecting crossover operator used by the algorithms 2020-04-20 15:30:10 +02:00
Kamil Śliwak
1ada2a52fb [yul-phaser] Mutations: Add two-point and uniform crossover operators 2020-04-20 15:30:10 +02:00
Kamil Śliwak
0efea99fa5 [yul-phaser] Phaser: Allow selecting the classic algorithm on the command line 2020-04-06 19:06:08 +02:00
Kamil Śliwak
f6783c60b2 [yul-phaser] GeneticAlgorithms: Add ClassicGeneticAlgorithm 2020-04-06 19:06:08 +02:00
Kamil Śliwak
8c86a4983d [yul-phaser] Population: Add combine() 2020-04-06 19:06:08 +02:00
Kamil Śliwak
ef8d0888af [yul-phaser] Population: Add symmetricCrossoverWithRemainder() 2020-04-06 19:06:08 +02:00
Kamil Śliwak
59011fcde6 [yul-phaser] Mutations: Add mutationSequence() 2020-04-06 19:06:08 +02:00
Kamil Śliwak
0837a62d5c [yul-phaser] Mutations: Add symmetricRandomPointCrossover() 2020-04-06 19:06:08 +02:00
Kamil Śliwak
b6f8ecf755 [yul-phaser] Selections+PairSelections: Add RandomSubset and PairsFromRandomSubset 2020-04-06 19:06:08 +02:00
Kamil Śliwak
7381068dcc [yul-phaser] Make the Population constructor that takes individuals public and use it to speed up some operations 2020-04-06 19:06:08 +02:00
Kamil Śliwak
2750bb9b90 [yul-phaser] TestHelpers: Generic operator << for printing tuples in boost tests 2020-04-06 19:06:08 +02:00
Kamil Śliwak
3f524ccfe5 [yul-phaser] Population: Print individuals in a more compact way 2020-03-25 10:21:18 +01:00
Kamil Śliwak
10e8d3616c [yul-phaser] AlgorithmRunner: Print total time when showing only the top chromosome 2020-03-25 10:21:18 +01:00