What an eye opener this book has turned out to be! This book is a few years old now but it is right up there with the state of the art of compiler theory and implementation.
They use throw away statements "Now we can remove this" and you sit on it for a day or two trying to figure out how they came to this conclusion.
Here are the basics of Continuation Passing Style, CPS which encompasses SSA. There is no stack. There is no stack. There really really is no stack. Nope, no stack. Heap? Nope, not unless you want one. No! No stack! Give it up already.
Why is this so good? Well, were you the kind of person who used to write large programs in assembler? Back in the days before Goto was Considered harmful? Well, turns out it is harmful not to use it down at the CPU level! :)
Back in the day I rarely used calls, most of the program flow was directable. Lots of jmp's to get where you want to go.. occasionally you wanted a GOSUB or sorts and you'd put the return address in a register or push it in to the stack. But in general, most of your program required very little stack manipulation.
Then something went wrong.. the industry decided we really really should put everything in the stack. Heck, even Smalltalk uses a stack full of Context's.
Well, in steps CPS - it can take your high level code and turn it back in to that highly optimised stackless program. The details and the guts of how this is achieved I'll leave for another blog post, ensuring I have something to write about on a slow day at work.
Needless to say I'm dumbfounded by how I got suckered in to the stack domain so easily with every body else. This is the first time I truely feel like applauding the efforts of computer scientist researchers.