Question

I want to convert LLVM IR into C like language (we can say toy C language) having grammar similar to C with some new keywords. I know I have to write a long code for doing this. But I do not how to proceed?

Can anyone guide me for the same? Or is some tutorial sort of thing is available, so that I can take help from it.

Thanks in Advance

Update1

I have come across a link explaining to build LLVM IR for Kaleidoscope if i can get a tutorial converting this IR back into code, it will give a lot of help

Was it helpful?

Solution

Your question is overly broad. This is a large task, and you should be more specific about which part of the task you're seeking help with. Here are some pointers to existing projects you may want to look at:

  1. The LLVM C backend - generates C code back from LLVM IR. The caveat is that this backend was dropped following the 3.1 release so you'll have to look in the sources of earlier releases.
  2. Emscripten - generates Javascript from LLVM IR
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top