source: Deliverables/D2.2/8051/src/cminor/cminorLabelling.mli @ 486

Last change on this file since 486 was 486, checked in by ayache, 8 years ago

Deliverable D2.2

File size: 700 bytes
Line 
1
2(** This module defines the labelling of a [Cminor] program. *)
3
4(** [add_cost_labels prog] inserts some labels to enable
5    cost annotation.
6
7    The labelling of a function proceeds as follows:
8
9    - A label is added at the beginning of the function.
10
11    - For each branching instruction in the function, a cost label is added at
12      the beginning of each branch. The concerned instructions are:
13      - ternary expressions;
14      - conditionals;
15      - loops;
16      - switches.
17
18    - For each label instruction in the function, a cost label is added after
19      the label, in order to capture loops potentially created by gotos.
20*)
21
22val add_cost_labels : Cminor.program -> Cminor.program
Note: See TracBrowser for help on using the repository browser.