next up previous contents
Next: SALTO-Specific Types Up: SALTO User Interface Specification Previous: SALTO User Interface Specification

Classes and Objects

The assembly module, or program, processed by SALTO is seen as a list of procedures. Each procedure is represented by means of a control flow graph (CFG). A control flow graph is a directed, possibly cyclic graph whose nodes are basic blocks, and whose edges correspond to control transfers (jumps) resulting from branch instructions.

Each basic block consists of a list of instructions, labels, and assembler directives. The information attached to an instruction consists of its source line number, opcode, a list of operands, and a reservation table of all resources involved in the execution of that instruction. Internally, SALTO uses two internal directives BEGIN_BASIC_BLOCK and END_BASIC_BLOCK to mark the beginning and the end of a basic block.

Instructions reference machine resources in two mutually exclusive ways: through uses and through accesses. The former are associated with functional units and characterize the fact that a given functional unit is required at a given stage of instruction execution. The latter are associated with storage resources, such as registers and memory locations, and describe data storage and extraction.

Resource requirements for a section of code can be represented using a user-modifiable reservation table which can then be used in optimizations involving instruction reordering.

Finally, any kind of additional information can be attached to a SALTO object using attributes, which can contain any type of data.

The object classes and types provided by the interface are the following:

class CFG
is used to represent functions as control flow graphs. The vertices of this graph are objects of class BB (see below) and the edges are labeled depending on the result of the branch instruction (TAKEN or NOT_TAKEN);
class BB
is used to represent basic blocks, i.e., linear sequences of instructions;
class INST
implements assembly instructions, labels, and directives. An instruction is not necessarily a mnemonic of the processor's instruction set: it can be a macro-instruction, a pseudo-instruction (directive), a label, or a SALTO marker (e.g., begin/end of basic block, begin/end of loop etc.);
class OperandInfo
models instruction operands, providing a simple means of manipulating operand contents: register names, constant symbols and values, etc.;
class SaltoAttribute
provides the implementation of the attribute concept.
class reserv_table1
implements reservation tables, used in scheduling algorithms;

Additional classes used in resource management are presented in section 3.6.


next up previous contents
Next: SALTO-Specific Types Up: SALTO User Interface Specification Previous: SALTO User Interface Specification

Erven Rohou
Fri Oct 17 09:15:29 MET DST 1997