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
Asked
Active
Viewed 4,279 times
1 Answers
8
You can use the C backend, with llc -march=c

SK-logic
- 9,605
- 1
- 23
- 35
-
2It is no longer available in llc-3.4.Is there any alternates? – Arunprasad Rajkumar Jul 30 '14 at 14:16
-
2@ArunprasadRajkumar, you may be interested in this one: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075875.html – SK-logic Aug 22 '14 at 17:06