And, it turns out, as I remarked earlier, not that big a deal. I just did a full rebuild of the $WORK sourcebase. 468 individual programs, ~520k lines of source (about 14.3M of it), 175M of PIR, generating 164M of bytecode, and not a function or subroutine in the whole lot. Well, in the original sourcebase, at least.
Total compilation time? 185 CPU minutes. Which is less than it took to compile just the biggest program before I wrote the allocation code. (It's just slightly more than half the time that it took to compile that one monster program)
Interestingly, I never once had to do anything at all extraordinary, or even very interesting, with the register allocation code. Nothing. In all that code, some of it pretty damned ugly to make up for the primitiveness of the language, I never once ran out of registers, and I was restricting myself to just R16-31, so as not to collide with the parameter passing bottom half, even though I could've for a lot of the code. Hell, I didn't have to write any spilling code, since I never had to spill.
Yes, this is a bit of a petty gloating post. (Nyah!) A moment of weakness. I'll make up for it later by going into detail on what you too can do with your own register allocation code and a machine model that actually makes it easy.
But now? Well... Nyah! :-P
Posted by Dan at June 20, 2005 04:54 PM | TrackBack (0)