[LLVMdev] unoptimised LLVM, not in SSA form
Chris Lattner
sabre at nondot.org
Sat Aug 27 09:12:27 PDT 2005
On Sat, 27 Aug 2005, Umar Janjua wrote:
> I am interested in obtaining LLVM IR without any optimization performed on
> it.( IR obtained from cfrontend's AST). Is this LLVM IR in SSA form?
You can do this, using "llvm-gcc -S". The ".s" file it produces is an
entirely unoptimized llvm file. Note that this is not really suitable to
source-to-source level transformations, but should have most of the
information from the source. If you add -g, you'll even get line number
info.
> Secondly, I want to make a transformation on this unoptimized IR, and convert
> it back to C. I believe llc -c does that.
Yup, llc -march=c
> Thirdly, is it possible to use LLVM tool suite on LLVM IR that's not in SSA
> form, if we have such LLVM so.
No, LLVM IR is always in SSA form. If PHI nodes specifically are a
problem for you, there are ways to produce LLVM code without any PHI nodes
(e.g. create allocas and do load/stores into them).
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list