How to convert llvm IR to c code?

江枫思渺然 提交于 2020-01-01 10:46:51

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!