On Mon, 5 Apr 2004, Vinay S. Belgaumkar wrote:
> Sorry for the confusion, Misha seemed to answer my question in one way.
> It'll be easier if I break down my question into parts -
Ah, ok. Yeah Misha got it :)
> - Is it possible to see the SSA form generated for my program ?
Yes, absolutely. If you have the LLVM bytecode file, just use llvm-dis.
For example:
$ llvmgcc -c test.c -o test.bc
$ llvm-dis test.bc -o test.ll
% vi test.ll
> - Now, if this form is readable, is it in assembly code format ?
Yes, it's documented in the LLVM language reference, here:
http://llvm.cs.uiuc.edu/docs/LangRef.html
To create a bytecode file again, use the llvm-as tool:
$ llvm-as test.ll -o test.bc -f
> We want to look at the SSA form for any program and see if we can make
> some changes ourselves to that format so that its reflected in the
> original code.
>
> Does this sound like too crazy a thing to do ? :)
Not at all!
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/