Commit Graph

182 Commits

Author SHA1 Message Date
chriseth
caddce6ef0 Detect duplicate cases based on integer value of case label. 2019-03-25 12:38:22 +01:00
chriseth
8514c0bc60 Provide max iterations for stack compressor as parameter. 2019-03-20 15:07:05 +01:00
chriseth
aa9a2935ac Properly determine whether a variable can be eliminated or not. 2019-03-20 15:07:05 +01:00
chriseth
38cbf8d230 Pass "optimize stack allocation" flag down to the stack compressor. 2019-03-20 15:03:27 +01:00
chriseth
93027c40b6
Merge pull request #6322 from ethereum/asm-datasize-exception-fix
Improve exception information in Yul function datasize(name) and dataoffset(name).
2019-03-20 10:50:49 +01:00
Alex Beregszaszi
5245a66d91
Merge pull request #6318 from ethereum/signal-failure-and-such
Allow simplification patterns to signal failure
2019-03-20 03:38:51 +00:00
Christian Parpart
7f7f44dd63 Improve exception information in Yul function datasize(name) and dataoffset(name).
Makes sure we properly throw a detailed exception instead of an out_of_range from std::map.
2019-03-19 17:17:32 +01:00
Alex Beregszaszi
f95388011b Allow simplification patterns to signal failure 2019-03-19 15:51:52 +01:00
Christian Parpart
89f1dbfbb6
[Yul] Refactors RedundantAssignEliminator for future changes wrt. break/continue statements. 2019-03-19 12:24:45 +01:00
chriseth
500843f9c5
Merge pull request #6242 from ethereum/yul-bc-dataflow
Yul dataflow analysis for continue/break statements
2019-03-14 16:34:34 +01:00
Christian Parpart
57bcb8ba83
[yul] Ensures DataFlowAnalyzer works fine with break/continue statements just like without. 2019-03-14 16:18:45 +01:00
chriseth
49d914a391 Fix and test yul stack optimization flag for commandline interface. 2019-03-14 15:34:23 +01:00
chriseth
6d1ed93247 Use stack optimizations. 2019-03-14 15:34:23 +01:00
chriseth
62d8080a19 Update optimiser readme. 2019-03-12 22:02:09 +01:00
Christian Parpart
05e2d362c8 [Yul] Adds break/continue statements and some general tests for for-loop syntax. 2019-03-11 15:05:05 +01:00
chriseth
791fde953d First simplify switch with known constant expression. 2019-03-06 21:32:55 +01:00
chriseth
21115f8050 Fix visitation order bug for structural simplifier. 2019-03-06 19:34:07 +01:00
Mathias Baumann
21322dae29 YulOpt: Remove empty cases 2019-03-06 19:02:23 +01:00
Mathias Baumann
be52aa3181 YulOpt: Move if-branches into functions 2019-03-06 19:01:05 +01:00
Mathias Baumann
3ce7069766 YulOpt: Remove empty cases 2019-03-06 18:39:44 +01:00
Mathias Baumann
433175b19e YulOpt: Add comment about optimization 2019-03-06 18:39:44 +01:00
Mathias Baumann
db3bea7b56 Use reference for so we have to type less 2019-03-06 18:39:44 +01:00
chriseth
831353c590
Merge pull request #6172 from ethereum/runYulOptAsLongAsHelpful
[Yul] Run yul optimizer until it has no effect anymore.
2019-03-06 11:41:22 +01:00
chriseth
f35694f655 Run yul optimizer until it has no effect anymore. 2019-03-05 20:30:13 +01:00
Mathias Baumann
f6e09d6368 YulOpt: Extend StructuralSimplifier to work with all types 2019-03-05 18:39:27 +01:00
Mathias Baumann
a52b50d770 libyul: Change assertThrow() to yulAssert() 2019-03-05 18:39:27 +01:00
Mathias Baumann
921d52bfcd Move Literal to u256 conversions to extra functions
That way we can reuse them at different places
2019-03-05 18:39:27 +01:00
chriseth
d0ab5454f8
Merge pull request #6171 from ethereum/ignorePrefixWhileInlining
Do not prepend function name to all variables when inlining.
2019-03-05 11:36:53 +01:00
Alex Beregszaszi
c64d42e6f5 Use currentToken()/advance() helpers from ParserBase consistently in AsmParser 2019-03-04 22:56:36 +01:00
chriseth
3f784d6e00 Do not prepend function name to all variables when inlining. 2019-03-04 18:07:00 +01:00
Christian Parpart
609855546e Yul: Adds optimizer pass to make variable names suffix-canonical. 2019-03-04 17:26:56 +01:00
Alex Beregszaszi
9fc7706537 Change unreachable parser error to assertion in AsmParser 2019-03-04 15:08:46 +01:00
chriseth
8f5e12c192 Make unavailable opcodes errors. 2019-02-28 22:20:01 +01:00
Mathias Baumann
c686a65876 Yul Optimizer: reduce switches with const arguments 2019-02-28 15:43:10 +01:00
chriseth
477c53a46f Fix expression simplifying by moving from SSAValueTracker to DataFlowAnalyzer as a base. 2019-02-27 16:14:39 +01:00
chriseth
9b7d793407 Fix windows build. 2019-02-26 19:43:24 +01:00
Alex Beregszaszi
cb7b053a4a Consider extcodehash as part of Constantinople 2019-02-26 12:40:31 +00:00
Alex Beregszaszi
5fc8e29fff More granular error reporting in warnOnInstruction in AsmAnalysis 2019-02-26 12:39:15 +00:00
chriseth
62e650dc42 Remove cpp files without symbols. 2019-02-25 17:23:11 +01:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
chriseth
8aeebf7fcd
Merge pull request #6071 from ethereum/moveEVMVersionToEVMDialect
Make EVM version part of EVM dialect.
2019-02-25 11:56:53 +01:00
chriseth
7f5b335b47 Make EVM version part of EVM dialect. 2019-02-21 21:59:46 +01:00
chriseth
91fb2d094d Clear state when entering new function. 2019-02-21 20:04:20 +01:00
Alex Beregszaszi
fcf884f201 Do not ignore fatal error in AsmParser for inline assembly 2019-02-21 16:18:53 +00:00
chriseth
15d275ed37
Merge pull request #6023 from ethereum/assignment-whitespace-op
Add extra token for assembly assignment
2019-02-21 14:43:29 +01:00
Mathias Baumann
f395d5bab4 Add extra token for assembly assignment
Adding an extra token for := prevents whitespace between : = being valid
2019-02-21 13:58:21 +01:00
chriseth
947215a901 Take builtin functions into account in the compilability checker. 2019-02-21 12:13:42 +01:00
chriseth
00084a9bd7
Merge pull request #6027 from ethereum/failEnErrorListNonEmpty
Make analysis success not only dependent on flag but also on error list.
2019-02-20 15:19:48 +01:00
chriseth
372853b192 Make analysis success not only dependent on flag but also on error list. 2019-02-20 14:57:58 +01:00
Alex Beregszaszi
0f1be75f97 Assert for parserResult in optimize in AssemblyStack 2019-02-20 13:54:24 +00:00