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

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/mltree/mltree-rtl.sig
ViewVC logotype

View of /sml/trunk/src/MLRISC/mltree/mltree-rtl.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 606 - (download) (as text) (annotate)
Sun Apr 9 23:10:59 2000 UTC (19 years, 8 months ago) by leunga
File size: 2046 byte(s)

   Assembly fix for x86 and other miscellaneous changes to MLRISC
(*
 * How to represent an RTL
 *)
signature MLTREE_RTL =
sig
   structure Basis : MLTREE_BASIS
   structure Region : REGION
   structure RTLExt : sig
       datatype  ('s,'r,'f,'c) sx = 
          ASSIGN of 'r loc * 'r
       |  PAR of 's * 's  

       and ('s,'r,'f,'c) rx = 
          FORALL of 'r
       |  FETCH  of 'r loc
       |  ARG    of string * string
       |  PARAM  of int * int
       |  OP     of Basis.misc_op ref * 'r list
       |  SLICE  of {from:'r, to:'r} list * Basis.ty * 'r 

       and  'r loc  = AGG of Basis.ty * endian * 'r cell

       and  'r cell = CELL of string * Basis.ty * 'r * 'r 

       and   endian = LITTLE_ENDIAN | BIG_ENDIAN

       and  ('s,'r,'f,'c) fx = FX
       and  ('s,'r,'f,'c) ccx = CCX
   end

   structure T : MLTREE
   structure Util : MLTREE_UTILS 
      sharing Util.T = T
      sharing RTLExt = T.Extension
      sharing Basis  = T.Basis
      sharing T.Region = Region

   datatype rtlOp     = datatype RTLExt.rx
   datatype rtlAction = datatype RTLExt.sx
   datatype rtlCell   = datatype RTLExt.cell
   datatype rtlLoc    = datatype RTLExt.loc
   datatype rtlEndian = datatype RTLExt.endian

   type action = T.stm
   type rtl    = action
   type exp    = T.rexp
   type cond   = T.ccexp
   type loc    = T.rexp rtlLoc
   type cell   = T.rexp rtlCell
   type ty     = T.ty

   (* Hashing and Equality *) 
   val hashRTL : action -> word
   val eqRTL  : action * action -> bool

   (* Pretty Printing *)
   val showRTL : {def:int->string, use:int->string,
                  regionDef:int->string, regionUse:int->string} -> T.printer
   val rtlToString : action -> string
   val expToString : exp -> string
   val new    : action -> rtl 
   val newOp  : {name:string, attribs:T.Basis.attribs} -> T.Basis.misc_op ref

   val COPY   : rtl
   val JMP    : rtl 

   (* Queries *)
   val can'tMoveUp         : rtl -> bool
   val can'tMoveDown       : rtl -> bool
   val hasSideEffect       : rtl -> bool
   val isConditionalBranch : rtl -> bool
   val can'tBeRemoved      : rtl -> bool

end 

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