MLRISC

MLRISC Contributors Requirements How to Obtain MLRISC

Overview

Problem Statement Contributions MLRISC Based Compiler MLRISC Intermediate Representation MLRisc Generation Back End Optimizations Register Allocation Machine Description Garbage Collection Safety System Integration Optimizations Graphical Interface Line Counts Systems Using MLRISC Future Work

System

Architecture of MLRISC The MLTREE Language MLTree Extensions MLTree Utilities Instruction Selection Assemblers Machine Code Emitters Delay Slot Filling Span Dependency Resolution The Graph Library The Graph Visualization Library Basic Compiler Graphs The MLRISC IR SSA Optimizations ILP Optimizations Optimizations for VLIW/EPIC Architectur... Register Allocator

Back Ends

The Alpha Back End The PA RISC Back End The Sparc Back End The Intel x86 Back End The PowerPC Back End The MIPS Back End The TI C6x Back End

Basic Types

Annotations Cells Cluster Client Defined Constants Client Defined Pseudo Ops Instructions Instruction Streams Label Expressions Labels Regions Regmap

# Client Defined Constants

Client Defined Constants

-Introduction -The Details

### Introduction

MLRISC allows the client to inject abstract constants that are resolved only at the end of the compilation phase into the instruction stream. These constants can be used whereever an integer literal is expected. Typical usage are stack frame offsets for spill locations which are only known after register allocation, and garbage collection and exception map which are resolved only when all address calculation are performed.

### The Details

Client defined constants should satsify the following signature:

     signature CONSTANT = sig
        type const

        val toString : const -> string
        val valueOf  : const -> int
        val hash     : const -> word
        val ==       : const * const -> bool
     end

The methods are:

`toString`
  a pretty printing function
`valueOf`
  returns the value of the constant
`hash`
  returns the hash value of the constant
`==`
  compare two constants for identity
``

The method `toString` should be implemented in all cases. The method `valueOf` is necessary only if machine code generation is used. The last two methods, `hash` and `==` are necessary only if SSA optimizations are used.

Lal George
Allen Leung

Generated by mltex2html
Last modified: Fri Oct 11 18:19:52 UTC 2019 by buildd@x86-grnet-02