X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=docs%2Fmini-doc.txt;h=ba19c1031f112256c83295ebe53f2ecf6dfb8680;hb=e78b5e75cc532a49cbd64c91fa9b7c3fdbeb8529;hp=30d9b4442b7ad5cc8c24bb5c2f67e04f5ab88008;hpb=ce581fac4e962f9ada55d8b8c3f8d34a4cdc23e2;p=mono.git diff --git a/docs/mini-doc.txt b/docs/mini-doc.txt index 30d9b4442b7..ba19c1031f1 100644 --- a/docs/mini-doc.txt +++ b/docs/mini-doc.txt @@ -4,7 +4,15 @@ Miguel de Icaza (miguel@{ximian.com,gnome.org}), Paolo Molaro (lupus@{ximian.com,debian.org}) - + This documents overall design of the Mono JIT up to version + 2.0. After Mono 2.0 the JIT engine was upgraded from + a tree-based intermediate representation to a linear + intermediate representation. + + The Linear IL is documented here: + + http://www.mono-project.com/Linear_IL + * Abstract Mini is a new compilation engine for the Mono runtime. The @@ -70,6 +78,24 @@ CIL code on the fly to marshal parameters, and then this code is in turned processed by the JIT engine. + Mono has now gone through three different JIT engines, these + are: + + * Original JIT engine: 2002, hard to port, hard to + implement optimizations. + + * Second JIT engine, used up until Mono 2.0, very + portable, many new optimizations. + + * Third JIT engine, replaced the code generation layer from + being based on a tree representation to be based on a linear + representation. + + For more information on the code generation changes, see our + web site for the details on the Linear IL: + + http://www.mono-project.com/Linear_IL + * Previous Experiences Mono has built a JIT engine, which has been used to bootstrap @@ -162,7 +188,7 @@ application domains, or generate code that will not be shared across application domains. -* Objectives of the new JIT engine. +* Second Generation JIT engine. We wanted to support a number of features that were missing: @@ -206,7 +232,7 @@ necessary that the JIT engine works in most of today's commercial hardware platforms. -* Features of the new JIT engine. +* Features of the Second JIT engine. The new JIT engine was architected by Dietmar Maurer and Paolo Molaro, based on the new objectives. @@ -375,13 +401,14 @@ variables to registers. The linear scan pass uses the information that was previously gathered by the loop nesting and loop structure computation to favor variables in inner - loops. + loops. This process updates the basic block `nesting' field + which is later used during liveness analysis. Stack space is then reserved for the local variables and any temporary variables generated during the various optimizations. -** Instruction selection +** Instruction selection: Only used up until Mono 2.0 At this point, the BURS instruction selector is invoked to transform the tree-based representation into a list of @@ -489,7 +516,9 @@ operations if possible. The rest of the code generation is fairly simple: a switch - statement is used to generate code for each of the MonoInsts + statement is used to generate code for each of the MonoInsts, + in the mono/mini/mini-ARCH.c files, the method is called + "mono_arch_output_basic_block". We always try to allocate code in sequence, instead of just using malloc. This way we increase spatial locality which gives a massive @@ -606,7 +635,7 @@ registers, fixed registers and clobbered registers by each operation. -* BURG Code Generator Generator +* BURG Code Generator Generator: Only used up to Mono 2.0 monoburg was written by Dietmar Maurer. It is based on the papers from Christopher W. Fraser, Robert R. Henry and Todd @@ -765,4 +794,4 @@ processors, and some of the framework exists today in our register allocator and the instruction selector to cope with this, but has not been finished. The instruction selection - would happen at the same time as local register allocation. < \ No newline at end of file + would happen at the same time as local register allocation. <