mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly document FullInliner's prerequisites
This commit is contained in:
parent
ba3f9dd2a2
commit
735326d50d
@ -1216,6 +1216,11 @@ we can run the optimizer on this specialized function. If it
|
||||
results in heavy gains, the specialized function is kept,
|
||||
otherwise the original function is used instead.
|
||||
|
||||
FunctionHoister and ExpressionSplitter are recommended as prerequisites since they make the step
|
||||
more efficient, but are not required for correctness.
|
||||
In particular, function calls with other function calls as arguments are not inlined, but running
|
||||
ExpressionSplitter beforehand ensures that there are no such calls in the input.
|
||||
|
||||
Cleanup
|
||||
-------
|
||||
|
||||
|
@ -44,10 +44,10 @@ class NameCollector;
|
||||
* Optimiser component that modifies an AST in place, inlining functions.
|
||||
* Expressions are expected to be split, i.e. the component will only inline
|
||||
* function calls that are at the root of the expression and that only contains
|
||||
* variables as arguments. More specifically, it will inline
|
||||
* variables or literals as arguments. More specifically, it will inline
|
||||
* - let x1, ..., xn := f(a1, ..., am)
|
||||
* - x1, ..., xn := f(a1, ..., am)
|
||||
* f(a1, ..., am)
|
||||
* - f(a1, ..., am)
|
||||
*
|
||||
* The transform changes code of the form
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user