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

1 Answer 1

7

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

Sign up to request clarification or add additional context in comments.

2 Comments

It is no longer available in llc-3.4.Is there any alternates?
@ArunprasadRajkumar, you may be interested in this one: lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075875.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.