ethereum / fe

Emerging smart contract language for the Ethereum blockchain.
https://fe-lang.org
Other
1.6k stars 178 forks source link

Yul codegen should use relooper algorithm #977

Open sbillig opened 7 months ago

sbillig commented 7 months ago

The codegen module currently uses a set of heuristics for re-creating loops from the control flow graph. The "relooper" algorithm might be a better solution. Some links:

https://crates.io/crates/relooper (This code looks reasonable, and might be easily adaptable to our situation) https://medium.com/leaningtech/solving-the-structured-control-flow-problem-once-and-for-all-5123117b1ee2 https://github.com/emscripten-core/emscripten/blob/master/docs/paper.pdf https://github.com/cfallin/waffle/tree/main https://dl.acm.org/doi/abs/10.1145/3547621