For full conference details, see the website: http://llvm.org/devmtg/2019-10/
Back To Schedule
Wednesday, October 23 • 5:00pm - 5:35pm
Towards better code generator design and unification for a stack machine

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

By design, LLVM backend infrastructure is geared towards classical register-based architectures. Thus, adapting it to a stack machine implies additional LLVM passes that are likely to vary depending on a target. For instance, the Selection DAG cannot produce instructions that directly handle the stack. Instead, it selects a relevant instruction version designed to work with registers. Then, MIR passes are performed to insert stack manipulations (pushes, pops, exchanges) and to convert instructions handling virtual registers into those handling stack slots. The suggested logic seems quite generic and not limited to a specific stack-based virtual machine. It is similar to other optimizations and analytical approaches that can be applied to stack machines regardless of the specific instruction set.
Previously, WebAssembly was the only implementation that needed a comprehensive stackification logic, now we created an option for the TON virtual machine (TVM). Given that stack machines are great for binary size minimization, stackification solutions are likely to face demand from other domains. So, we would love to discuss whether or not the community needs generic algorithms that can be integrated with various backends and if stack-machine support might benefit the target-independent code generator.


Wednesday October 23, 2019 5:00pm - 5:35pm
Breakout Room-2 (LL21CD)

Attendees (16)