LWN.net Logo

pcc seeks contributions to reach 1.0 milestone

pcc seeks contributions to reach 1.0 milestone

Posted Nov 20, 2008 0:16 UTC (Thu) by bboissin (subscriber, #29506)
In reply to: pcc seeks contributions to reach 1.0 milestone by ragge
Parent article: pcc seeks contributions to reach 1.0 milestone

You should really consider having SSA as your primary IR. It makes so many things trivial... I especially like the IR used by libfirm (http://www.info.uni-karlsruhe.de/software/libfirm/index.p... ). It gives you many things for free (SSA all along, no dead code, etc.)


(Log in to post comments)

pcc seeks contributions to reach 1.0 milestone

Posted Nov 20, 2008 7:51 UTC (Thu) by nix (subscriber, #2304) [Link]

I'm fairly sure 'having SSA as your primary IR' makes no real sense: it's
like saying 'having assignment as your primary IR'. Having your primary
IR, *whatever it is*, be in SSA form for as much of the time as possible
is probably a very good thing (although I'm not sure how you could convert
*directly* to it: you'd need to go through a non-SSA form immediately
after parsing, and you'd need to go through another one immediately before
conversion to assembler or your output would be ludicrously inefficient).

pcc seeks contributions to reach 1.0 milestone

Posted Nov 20, 2008 16:49 UTC (Thu) by bboissin (subscriber, #29506) [Link]

"you'd need to go through another one immediately before conversion to assembler or your output would be ludicrously inefficient"

Coalescing is done during the Out-of-SSA pass (and it would be very inneficient to do the Out-of-SSA by replacing each phi with a move), if you're in CSSA form, just replace every phi-related variable with a unique variable and that's all (so the hard part is the conversion to CSSA).

As for the IR, I believe SSA can really influence your IR, so it's not just a property (you need parallel moves, etc). Libfirm does that very nicely from what I've seen.

pcc seeks contributions to reach 1.0 milestone

Posted Nov 20, 2008 22:36 UTC (Thu) by nix (subscriber, #2304) [Link]

I only just learned of libfirm from this thread, and it looks *deeply*
cool. I can think of half a dozen potential uses for it already :)

pcc seeks contributions to reach 1.0 milestone

Posted Dec 4, 2008 17:15 UTC (Thu) by salimma (subscriber, #34460) [Link]

LLVM IR is almost entirely in SSA form -- it still has pointers, but apart from that, assignments must be to fresh "registers"

pcc seeks contributions to reach 1.0 milestone

Posted Dec 5, 2008 0:44 UTC (Fri) by nix (subscriber, #2304) [Link]

Oh yes, agreed. I was being pedantic in another area, that it makes no
sense to say that you use SSA *as* your IR, because it's not an IR, just a
set of rules that constrain that IR (it's applicable to many different
sorts of IR, but *you* know that.)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds