The RA_USER_PARAMS signature

Architecture specific parameters regquired by the RegAllocator register allocator.


Synopsis

signature RA_USER_PARAMS

Interface

structure I : INSTRUCTIONS
val nFreeRegs : int
val dedicated : int list
val getreg : {pref : int list, proh : int list} -> int
val copyInstr : (int list * int list) -> I.instruction
val spill : {instr : I.instruction, reg : int} -> {code : I.instruction list, proh : int list, instr : I.instruction option}
val reload : {instr : I.instruction, reg : int} -> {code : I.instruction list, proh : int list}

Description

structure I

nFreeRegs
the number of free registers available -- or the number of colors to use during graph coloring.

dedicated
a list of dedicated registers. All dedicated registers are factored out of the graph. Since they are always live, they interfere with everything. It is easiest to forget about them when constructing the interference graph.

getreg {pref, proh}
get a register preferring one of the registers in the pref list, and prohibiting any register in the prob list.

copyInstr (dstList, srcList)
Return a parallel copy instruction using the srcList and dstList values.

spill {instr, reg}
spill the register reg defined in the instruction instr, returning spill code in code, and the original instruction. The original instruction may be NONE when rematerialization has occured. proh is a list of registers to be added to the list of registers that should never be spilled.

reload {instr, reg}
reload the register reg used in the instruction instr, returning a sequence of instructions to be inserted into the instruction stream, and a list of registers to be added to the list of register that should never be spilled.



  Submit a comment on this page  

[ INDEX | TOP | Parent | Root ]

Author: Lal George
Last Modified: October 18, 1996
Copyright © 1996 Bell Laboratories