GHC currently has an excellent semi-whole program optimizer for Haskell-level code. And it has LLVM for optimizing the generated assembly. What is missing is an intermediate level optimizer that optimizes asm prior to LLVM, and has awareness of the properties of the Haskell runtime: e.g. immutability, lack of aliasing (properties LLVM can't see). With this last piece, all aspects of code generation are getting heavy duty optimizer treatment.
The new code gen is also pluggable, so you can add new optimizer passes easily (e.g. by implementing text book algorithms)
Heh, 'semi-whole' seems to be a bit of an oxymoron. Could you explain exactly what that means? Do you just mean that it looks at your whole program but not the libraries you use?