LWN.net Logo

Good link

Good link

Posted Nov 18, 2008 7:59 UTC (Tue) by roskegg (subscriber, #105)
In reply to: pcc seeks contributions to reach 1.0 milestone by RandyBolton
Parent article: pcc seeks contributions to reach 1.0 milestone

Ragge's presentation that you linked to was really nifty. I didn't realize a C compiler could be so simple.

I hope he finishes pdp10 support at some point, and that NetBSD and OpenBSD get ported to the PDP10. It would be a fun honeypot to leave running.


(Log in to post comments)

Good link

Posted Nov 18, 2008 16:03 UTC (Tue) by nix (subscriber, #2304) [Link]

The *very* early C compilers are even more stunningly simple, and they
probably work quite well for PDP10s, and are good examples even now of
simple parsers.

But if you want to get decent performance on modern hardware you *need*
things like speculative code motion (to avoid pipeline stalls), and if you
want that then you need dataflow analysis and I can see no way they can do
that with PCC without turning it into something quite different.

So perhaps they plan for this to stay forever in the ghetto of 1980s and
pre-1980s hardware? I'm not sure, but it hardly seems like an exciting
growth area to me.

Good link

Posted Nov 19, 2008 7:28 UTC (Wed) by ragge (guest, #55254) [Link]

Please look at the presentation again. The things you mentions are already put in the compiler. The initial design of the compiler made it very easy to add state-of-the-art optimizing stuff. I think especially the multi-class register allocator is one of the best available today.

Currently the code generated is between 0-10% slower than code generated by gcc, and most of the time "lost" is due to not-yet added optimizations. Still, the compiler runs around 15 times faster than gcc.

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