Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /MLRISC/trunk/staged-allocation/staged-allocation-sig.sml
ViewVC logotype

Diff of /MLRISC/trunk/staged-allocation/staged-allocation-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3008, Mon Apr 28 19:40:46 2008 UTC revision 3009, Tue Apr 29 00:36:12 2008 UTC
# Line 10  Line 10 
10   * Terminology for staged allocation (see the paper for more details):   * Terminology for staged allocation (see the paper for more details):
11   *   counter - stores of current the number of bits allocated to the call   *   counter - stores of current the number of bits allocated to the call
12   *   location - a mechanism for passing a parameter, e.g., machine registers, stack locations, etc.   *   location - a mechanism for passing a parameter, e.g., machine registers, stack locations, etc.
13   *   slot - a parameter   *   slot - corresponds to a parameter
14   *   alignment - alignment in bits for a location   *   alignment - alignment in bits for a location
15   *   width - width in bits for a location   *   width - width in bits for a location
16   *   stage - one rule for specifying calling conventions   *   stage - one rule for specifying calling conventions
# Line 78  Line 78 
78       * a location for passing the argument.       * a location for passing the argument.
79       *)       *)
80      type stepper_fn = (str * slot) -> (str * location_info)      type stepper_fn = (str * slot) -> (str * location_info)
81    
82      (* Create a counter. *)      (* Create a counter. *)
83      val freshCounter : unit -> counter      val freshCounter : unit -> counter
84    
85      (* helper function that creates a counter c, and returns the sequence:      (* helper function that creates a counter c, and returns the sequence:
86       * [BITCOUNTER c, REGS_BY_BITS (c, regs)] (this function is taken from       * [BITCOUNTER c, REGS_BY_BITS (c, regs)] (this function is taken from
87       * the paper).       * the paper).
88       *)       *)
89      val useRegs : reg list -> (counter * stage)      val useRegs : reg list -> (counter * stage)
90    
91      (* find the value stored at a counter. *)      (* find the value stored at a counter. *)
92      val find : (str * counter) -> int      val find : (str * counter) -> int
93    
94      (* initialize a list of counters for a calling convention. *)      (* initialize a list of counters for a calling convention. *)
95      val init : counter list -> str      val init : counter list -> str
96    
97      (* take a calling convention, and return a stepper function for it. *)      (* take a calling convention, and return a stepper function for it. *)
98      val mkStep : stage list -> stepper_fn      val mkStep : stage list -> stepper_fn
99    
100        (* perform staged allocation over a list of slots *)
101        val doStagedAllocation : (str * stepper_fn * slot list) -> (str * location_info list)
102    
103    end (* STAGED_ALLOCATION *)    end (* STAGED_ALLOCATION *)

Legend:
Removed from v.3008  
changed lines
  Added in v.3009

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0