matter-labs / era-compiler-llvm

ZKsync fork of the LLVM framework.
Other
33 stars 16 forks source link

[EVM] Implement stack machine friendly scheduler on ISel #724

Open PavelKopyl opened 4 weeks ago

PavelKopyl commented 4 weeks ago

EVM has the EVMSingleUseExpression pass that performs code scheduling to reduce a number of required stack manipulation instructions. This pass work at the end of compilation pipeline, before the stackification transformation. It makes sense to try to implement stack machine friendly code scheduling at in the ISel scheduler, as described in the article: instruction_scheduling_for_stack_machines.pdf

akiramenai commented 4 weeks ago

@PavelKopyl could you refine why we should have 2 schedulers instead of tuning the existing one?