LWN.net Logo

"Dependent on" ???

"Dependent on" ???

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

This is also waiting on some heroic figure rewriting the register allocator so that earlier passes can get decent feedback on whether they're going to spill to hell and back or not (and then the earlier passes would have to get updated to use this information...)

How funny! This is exactly what I want to do in the Mono JIT :-)
Here's a link to a presentation about our medium-long term JIT plans: "http://www.go-mono.com/meeting06/MonoSummit2006-JIT.pdf".

Actually we will not go fully SSA so fast, and maybe never. But we will rewrite the register allocator, and in the SSA path I will make sure that the communication between the optimization passes and the regalloc will happen effectively!

If you ever want to "chat" about compiler internals, feel free to drop me a mail (massi(at)ximian"dot"com).


(Log in to post comments)

"Dependent on" ???

Posted Feb 28, 2007 23:19 UTC (Wed) by nix (subscriber, #2304) [Link]

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...

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