Next: , Previous: , Up: compiler   [Index]


17.11 Source optimisation

For an introduction to the source code see the thesis:

Oscar Waddell. “Extending the Scope of Syntactic Abstraction”. PhD. Thesis. Indiana University Computer Science Department. August 1999.

and the paper:

Oscar Waddell, R. Kent Dybvig. “Fast and Effective Procedure Inlining”. Indiana University. Computer Science Department. Technical Report No. 484.

The following bindings are exported by the library (vicare compiler).

Function: pass-source-optimize input

Perform code transformations traversing the whole hierarchy in input, which must be a struct instance representing recordised code, and building a new hierarchy of recordised code; return the new hierarchy.

Parameter: source-optimizer-passes-count

Specify how many passes to perform with the source optimizer; it must be a positive fixnum. Defaults to 1; it is set to 2 when the optimisation level is 3.

It makes sense to perform zero, one or two passes; it is unlikely that more passes can do significant improvement.

The following bindings are exported by the library (vicare).

Parameter: optimize-level

The optimization level; accepted values are the fixnums 0, 1, 2, 3. Defaults to 2.

Parameter: cp0-effort-limit

The initial value of an "effort counter" that is decremented every time an optimisation is performed by the source optimiser; when the counter reaches zero: the current optimisation effort is abandoned and the original input expression kept as is. It is set every time the optimiser enters specific subexpressions of the input.

Parameter: cp0-size-limit

The initial value of a (estimated) code size counter that is decremented every time an optimisation is performed by the source optimiser; when the counter reaches zero: the current optimisation effort is abandoned and the original input expression kept as is. It is set every time the optimiser enters specific subexpressions of the input.


Next: , Previous: , Up: compiler   [Index]