The Mono team is working on a number of directions to
improve code generation. Although Massi has worked on a
number of advanced optimizations to improve code generation
(based on SSA and HSSA), the improvements were dominated by
problems on the register allocation.

We are working in two directions to fix this issue. A
long-term fix is the new linear IR representation which Zoltan
is working on. This code today is available in the
mini-linear-il branch on SVN. The intention of this new IR
is to improve the visibility of register usage to the register
allocator, so it can make better choices when producing code.

A second line of work emerged from our research into
inlining. Turning on the Mono inliner produced worse code
than not turning on the inlining at all (we have it turned off
by default on Mono). The problem was that inlining produced
plenty of local variables and the resulting IR became very
hard to optimize by the higher layers of the JIT engine so
Massimiliano devised a plan to eliminate these extra temporary
variables.

The details of this new optimization can be found on his
mailing list post "Tree
Mover".

What follows are a few excerpts from the email. Consider
this piece of C# code: