[LLVMdev] Which is suited for Analysis of non-SSA code : gcc or LLVM

John Criswell criswell at illinois.edu
Mon Nov 11 07:38:46 PST 2013


On 11/11/13 3:47 AM, Saleena Nazeer wrote:
> Hi,
> We are planning to implement an analysis and optimization specifically 
> meant for non-SSA code. We would like to know whether LLVM supports 
> non-SSA IR? The other choice we have is to work with the GIMPLE code 
> of GCC. We need your help in choosing the appropriate framework.

Heap objects and address-taken global and stack variables are not in SSA 
form in LLVM.  You can therefore use your analysis on them (although be 
aware that you'll have to deal with weak updates due to aliasing).

Also, I would think that an analysis on non-SSA variables would also 
work on SSA variables; the analysis just may not be as efficient as it 
could be because it's not taking advantage of the SSA form.  Is there a 
particular reason why you're looking for a non-SSA IR?

The machine code IR in LLVM (MachineInstrs, MachineBasicBlocks, etc.) is 
not required to be in SSA form.  I think it starts in SSA form and is 
then changed into non-SSA form during code generation. You could make 
your analysis and optimization a MachineFunctionPass, but if it's meant 
to run on a platform-independent IR, I'm not sure it's the best choice.

The Clang AST is higher level than LLVM IR, but I don't think it's in 
SSA form.

As for GIMPLE, I've never worked with it, so I can't compare it to LLVM.

-- John T.

> thanks
> Saleena N
> National Institute of Technology Calicut
> India
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131111/5b940b3c/attachment.html>


More information about the llvm-dev mailing list