问题
Is there any way to convert the llvm IR to c code and keep its semantics? For example, can we compile the c code first to llvm IR and then compile it back to another piece of c code. I don't expect that these two files will be the same. But they need to have the same functionality. Thanks
回答1:
You can use the C backend, with llc -march=c
来源:https://stackoverflow.com/questions/8563670/how-to-convert-llvm-ir-to-c-code