ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
23.3k stars 5.77k forks source link

Improvements in the Yul-EVM Code transform #13721

Open NunoFilipeSantos opened 1 year ago

NunoFilipeSantos commented 1 year ago

What

Improve Yul-EVM code transform and remove stack-too-deep errors as blockers to via IR.

Why

Currently, the via-IR compilation pipeline is not viable as default compilation mode for two reasons:

Tasks

Out of scope

cameel commented 1 year ago

12865 likely should also be considered a part of this. It does not cause "stack too deep" on its own but unnecessary unlinked references have similar impact on tools in terms of blocking via IR adoption.

ekpyron commented 1 year ago

12865 likely should also be considered a part of this. It does not cause "stack too deep" on its own but unnecessary unlinked references have similar impact on tools in terms of blocking via IR adoption.

  1. We shouldn't cross-scope these things, so I categorically wouldn't consider this as a part here.
  2. We likely won't solve this issue here without optimizer anyways, and with optimizer the other one is a non-issue. So the main thing to consider here would be a minimal optimization sequence by default for via-IR, which we'll probably do, but yeah, this is off-topic here.
NunoFilipeSantos commented 1 year ago

12865 likely should also be considered a part of this. It does not cause "stack too deep" on its own but unnecessary unlinked references have similar impact on tools in terms of blocking via IR adoption.

  1. We shouldn't cross-scope these things, so I categorically wouldn't consider this as a part here.
  2. We likely won't solve this issue here without optimizer anyways, and with optimizer the other one is a non-issue. So the main thing to consider here would be a minimal optimization sequence by default for via-IR, which we'll probably do, but yeah, this is off-topic here.
  1. Absolutely. If it's tangent, it shouldn't belong here.
  2. I'm in favor of heavily scoping down initially and seeing where we land in Q1, rather than expanding immensely and missing such a large goalposts (a full quarter).

Remember that we don't plan for 100% of our time, meaning all the other day to day "sidequests" also take time.