Remove MIR_simplify_func description.  Add info about simplification
after load and inlining after linking.
@@ -468,9 +468,8 @@ ex100: func v
* The default error function prints the message into stderr and call `exit (1)`
* MIR is pretty flexible and can describe complex insns, e.g. insns
whose all operands are memory. Sometimes you need a very simple
- form of MIR representation. API function `MIR_simplify_func
- (MIR_context ctx, MIR_item_t func, int mem_float_p)` simplifies the function insns as much as
- possible by adding new insns and registers resulting in a form in which:
+ form of MIR representation. During load of module all its functions are simplified as much
+ as possible by adding new insns and registers resulting in a form in which:
* immediate, memory, reference operands can be used only in move insns
* memory have only base register (no displacement and index register)
* string and float immediate operands (if `mem_float_p`) are changed onto
@@ -478,7 +477,8 @@ ex100: func v
* Before execution of MIR code (through interpreter or machine code generated by JIT),
you need to load and link it
* You can load MIR module through API function `MIR_load_module
- (MIR_context ctx, MIR_module_t m)`. The function allocates the module data/bss
+ (MIR_context ctx, MIR_module_t m)`. The function simplifies module code.
+ It also allocates the module data/bss
and makes visible the exported module items to other module
during subsequent linking. There is a guarantee that the
different data/bss items will be in adjacent memory if the
@@ -511,6 +511,7 @@ ex100: func v
* Imports/exports of modules loaded since the last link can be
linked through API function `MIR_link (MIR_context ctx, void (*set_interface) (MIR_item_t item),
void * (*import_resolver) (const char *))`
+ * `MIR_link` function inlines most `MIR_INLINE` calls
* `MIR_link` function also sets up call interface
* If you pass `MIR_set_interp_interface` to `MIR_link`, then
called functions from MIR code will be interpreted
@@ -530,7 +531,7 @@ ex100: func v
MIR_load_external is not convenient
# MIR code execution
- * Linked MIR code can be exectuted by an **interpreter** or machine code generated by **MIR generator**
+ * Linked MIR code can be executed by an **interpreter** or machine code generated by **MIR generator**
# MIR code interpretation
* The interpreter is an obligatory part of MIR API because it can be used during linking
@@ -543,7 +544,6 @@ ex100: func v
MIR_val_t *vals)`
* The function results are returned through parameter `results`. You should pass
a container of enough size to return all function results.
- * Please remember that these functions simplify the MIR code function if it was not simplified yet
* You can execute a MIR function code also through C function call
mechanism. First you need to setup the C function interface
through API function `MIR_set_interp_interface (MIR_context ctx, MIR_item_t
