[Mono-devel-list] proposal for a different JIT
Paolo Molaro
lupus at ximian.com
Wed Oct 15 06:49:41 EDT 2003
On 10/14/03 Emanuele Ruffaldi wrote:
> I propose an alternative way for the implementation of the JIT in the
> Mono system. The idea is to use the back end of the GCC compiler, but
> instead of creating a full front-end I propose to use the KSI front-end,
> that is a direct mapping of the GCC back-end tree (for details see
> http://ftp.pld-linux.org/people/malekith/ksi/)
It is an interesting idea and probably a worthy argument for a student
doing a thesis on it, but I'm not sure it is as easy as you think it
will be (or practical due to the speed issues and the huge work I think
would be needed to make it work correctly).
I don't know what kind of abstraction on the hardware the gcc backend
provides, but IL code demands much more bare-metal knowledge than, say,
C, C++ or java. So, getting the backend to produce correct code likely
requires adding new features to it and port them to the different
platforms (for example, check the .ovf variants of some opcodes, or the
handing of NaNs required when comparing floating point numbers etc.).
Getting a prototype working may be easy, but I think it will be hard to
provide the level of compatibility the CLR requires across the different
platforms.
Another issue may be the need to constrain the optimizations gcc
performs to keep the semantics of code correct: I don't know if the gcc
backend provides any facilities to encode such constraints. Exanples
are:
*) some operations may have side effects unknown to gcc (like the
raising of an exception with a division by 0)
*) code reordering and hoisting needs to be constrained to keep
the order of possibly implicit exceptions constant
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list