5

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

Zhongshu
  • 503
  • 6
  • 13

1 Answers1

8

You can use the C backend, with llc -march=c

SK-logic
  • 9,605
  • 1
  • 23
  • 35