Xiaohui Liu via llvm-dev
2021-Apr-29 06:17 UTC
[llvm-dev] Can LLVM optimize for a stack machine backend?
Hi all, I am developing a high-level language that compiles to bytecode for a stack-based virtual machine. There are only two stacks similar to Forth <https://en.wikipedia.org/wiki/Forth_(programming_language)>. LLVM IR seems register-machine oriented and most backends target register machines. I have seen several attempts to use it for a stack machine backend, such as this <https://lists.llvm.org/pipermail/llvm-dev/2009-February/020335.html>, this <https://lists.llvm.org/pipermail/llvm-dev/2008-November/018626.html>, and this <https://lists.llvm.org/pipermail/llvm-dev/2006-August/006460.html>. What is the state of the art of using LLVM to optimize for a stack machine? Or LLVM is not a good choice for this job? Regards, Xiaohui -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210428/7510a844/attachment.html>
Quentin Colombet via llvm-dev
2021-Apr-29 17:06 UTC
[llvm-dev] Can LLVM optimize for a stack machine backend?
Hi Xiaohui, I think the situation didn’t really change with respect to what you found. In particular I believe the advice from Chris that you already found (https://lists.llvm.org/pipermail/llvm-dev/2008-November/018626.html <https://lists.llvm.org/pipermail/llvm-dev/2008-November/018626.html>) is the best thing you can do right now. Cheers, -Quentin> On Apr 28, 2021, at 11:17 PM, Xiaohui Liu via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all, > > I am developing a high-level language that compiles to bytecode for a stack-based virtual machine. There are only two stacks similar to Forth <https://en.wikipedia.org/wiki/Forth_(programming_language)>. > > LLVM IR seems register-machine oriented and most backends target register machines. I have seen several attempts to use it for a stack machine backend, such as this <https://lists.llvm.org/pipermail/llvm-dev/2009-February/020335.html>, this <https://lists.llvm.org/pipermail/llvm-dev/2008-November/018626.html>, and this <https://lists.llvm.org/pipermail/llvm-dev/2006-August/006460.html>. What is the state of the art of using LLVM to optimize for a stack machine? Or LLVM is not a good choice for this job? > > Regards, > Xiaohui > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210429/bb2e0072/attachment.html>