PAGODE: A back end generator
PAGODE is a back-end generator based on tree rewritings that takes as input a target machine description using a special purpose language called SCALA and produces a code generator that performs instruction selection, register allocation and scheduling and produces assembly code. A target machine specification written in SCALA language must be hierarchically organized into concepts corresponding to the main features of the instruction set processor: locations, addressing modes and instructions. The semantics of each concept of the target machine specification is given by a template which is a term of an ADT (abstract data type). Such an ADT is specific to a given target machine and must be specified by the compiler writer while writing the SCALA specification. An abstract data type is a collection of sorts with their axioms. A sort is similar to a type with its operators. A term is an object of a given type built from these operators. The SCALA specification of a target machine requires only the syntactic part of the ADT. The terms built on this ADT are called PMIR (PAGODE medium intermediate representation), they are used as input to a back-end produced by the PAGODE system. In the PMIR input term to the back-end, instructions act on cells via operators denoting access paths to cells. For CISC machines, the code generation process is divided into three steps: instruction selection, binding and register allocation. Additional steps of scheduling are provided for RISC machines. The engines that perform those steps are automatically produced by the PAGODE system. The instruction selection process applies a set of rewriting rules driven by non linear free templates derived from the target machine specification to the PMIR term. Basically each instruction of the PMIR is matched with an instruction template. In the context of such a template, the operands are matched with addressing mode templates. If an operand does not match any addressing mode template and a subterm does, then the location depicted by the subterm is stored in a ``temporary resource using a universal store. The PMIR is rewritten using this temporary resource. The output of the instruction selector belongs to the LIR (low level intermediate representation) of the target machine. It includes universal assignments, references to temporaries, addressing modes and instructions in their ``canonical representation. The second code generation step, called binding, sets constraints on those temporaries according to the whole context and performs life-time analysis and packing on temporaries. A LIR term can be either the input of the register allocator or the scheduler. The instanciation of a register allocator uses the description of the physical resources deduced from the target machine specification and an additional specification for the production of spill code. The scheduler works on the LIR using data dependence analysis on the target machine resources and attributes on the use of functional units that have been added to the target machine specification. For the entire collection see [Zbl 0875.00110].
- scientific article; zbMATH DE number 4178747
- Code generation, concepts, tools, techniques. Proceedings of the international workshop on code generation, Dagstuhl, Germany, 20-24 May 1991
- Towards an algebraic specification of code generation
- Automatically generating instruction selectors using declarative machine descriptions
This page was built for publication: PAGODE: A back end generator
Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q4281618)