Yafei Liu via llvm-dev
2019-Feb-27 03:02 UTC
[llvm-dev] Is there still a way to turn IR code into C++ API?
Hi, I'm learning to build a compiler for my toy language, and LLVM is totally a new thing for me. I feel hard to turn an AST to the C++ API code, and sometimes I have to write some C++ source code and turn it into IR code to find some clue, but most time this will not help, I don't know what API I should use even if I got the IR code. I search for a long time and find that there used to be a backend which can turn IR code back to C++ API code called "cpp", but it is removed. And there used to be a online demo page which can do this, can it is disabled. So is there still a way to turn IR code back to C++ API? If not, what the best way to learn how to represent AST by using C++ APIs? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190227/45f4aaa1/attachment.html>
Jeremy Lakeman via llvm-dev
2019-Mar-04 01:53 UTC
[llvm-dev] Is there still a way to turn IR code into C++ API?
This was removed because it bit-rotted. Nobody was maintaining it as IR changed, nor was it the best way to write IR. You'll probably want to walk through your AST and use an IRBuilder similar to the description in the Kaleidoscope tutorial. https://llvm.org/docs/tutorial/index.html On Wed, 27 Feb 2019 at 13:32, Yafei Liu via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, I'm learning to build a compiler for my toy language, and LLVM is > totally a new thing for me. I feel hard to turn an AST to the C++ API code, > and sometimes I have to write some C++ source code and turn it into IR code > to find some clue, but most time this will not help, I don't know what API > I should use even if I got the IR code. > > I search for a long time and find that there used to be a backend which > can turn IR code back to C++ API code called "cpp", but it is removed. And > there used to be a online demo page which can do this, can it is disabled. > > So is there still a way to turn IR code back to C++ API? If not, what the > best way to learn how to represent AST by using C++ APIs? > _______________________________________________ > 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/20190304/0766ef2f/attachment.html>