MLRISC

Modern micro-processors have become complicated in design, that writing a good native code generator for any language is a considerable investment. Unfortunately, this investment usually repeats the efforts of others, and does not easily carry over to different front ends or new micro-processor architectures. This has been a major impediment to programming language designers and compiler researchers. MLRISC provides a framework to support the customization and reuse of native code generators. The framework uses a low level, strongly typed, tree-based intermediate language called MLRisc, that can be customized to the needs of the front end and pseudo-op directives of target assemblers. Optimizations over a flowgraph of native machine instructions are implemented as curried applications of higher-order modules to machine specific properties and user specific properties, thus making them easily adaptable across architecutures and front ends. Complex code generators can be constructed from high quality components in a framework that guarantees that the individual pieces are joined together correctly. Once MLRisc has been generated, code generators that build the flowgraph of target machine instructions, perform register allocation, and finally emit target machine code or assembly instructions, are obtained for free.

Introduction

MLRisc Generation

MLRisc

Flowgraphs

Register Allocation

Label Backpatching

Instruction Scheduling

Alpha32 Code Generator

Example Backend


  Submit a comment on this page  

[ INDEX | TOP | Parent | Root ]

Author: Lal George
Last Modified: September 4, 1996
Copyright © 1996 Bell Laboratories