[LLVMdev] LLVM SSA
ofv at wanadoo.es
Sat Sep 26 12:02:13 PDT 2009
ivtm <martinaide1 at yahoo.com> writes:
> I am familiar with the LLVM IR a little bit and I am parsing much more
> complex examples. I just gave this example, to show that I would like to
> have only 1 variable, not 2, the way SSA would generate it.
> I am actually using LLVM purely as a front end to translate to .bc files and
> then I have my own parser from there.
> At any rate, is there an option to the llvm-gcc --emit-llvm to tell it to
> produce .bc files that are at least space optimized (or even better, not in
> SSA form) ?
You could simulate a Load/Store architecture by mapping each variable to
an AllocaInst (which is what all compilers do, I guess). Then in your
passes track accesses to those allocas.
More information about the llvm-dev