Could you write(apologies if I'm missing something) some documentation on how the backend is organised and the overall motion through it? I've often looked at it but been almost totally unable to grok how any thing actually works beyond the abstract of what the optimisations say on tin.
Could a step forward be to start afresh and then call into the old backend stages but ultimately rewrite them in more bearable code where possible? Might be a compile time trade-off there, to an extent.
You'd be right!
> but is now in a tasty form of spaghetti D)
Haha. It's still as awful as the C code it was manually converted to D from. I've been slowly improving it bit by bit.