LWN.net Logo

"Dependent on" ???

"Dependent on" ???

Posted Feb 28, 2007 23:19 UTC (Wed) by nix (subscriber, #2304)
In reply to: "Dependent on" ??? by massimiliano
Parent article: Mitchell Baker and the Firefox Paradox (Inc)

Interesting stuff. Of course the Mono JIT is operating under more constraints than GCC in some respects (`compilation' must be *fast*) but it's more amenable to rewrites because you don't have to target a myriad decade-old backends rife with unstated assumptions and with widely-varying constraints on (e.g.) the register file.

Zack Weinberg put it well in an IRC conversation (later reprinted in the acknowledgements to _A Maintenance Programmer's View of GCC_ in the 2003 GCC Summit proceedings):

Take an H. R. Giger painting, you know, with the perverse and insanely complicated biomechanical constructs.

Now, instead of being all shiny and new, make it old and overgrown with weeds. Slimy weeds.

Much of GCC is better than that these days (thanks to tree-ssa obsoleting many of the nasty parts, and a lot of effort to clean up the problems Zack identified in that paper), but some parts (notably reload and the rest of the register allocator, and combine) are still deep in the slime.

The first part of Vlad Makarov's _Fighting register pressure in GCC_ (in the 2004 summit proceedings) has a good description of how the current allocator works, and the extreme constraints on changing it. That attempt at rewriting the allocator ran into the slimy weeds and got all tangled up; virtually every subsequent summit proceedings has the skeleton of another attempt in it.

Someday, someone will succeed... you're already talking about moving away from BURG, but one of the earlier rewrite attempts was I think trying to move to it. I'm fairly sure the Mono compiler's register allocator can do a better job at this intractable task than GCC's can...


(Log in to post comments)

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