SCM Repository
View of /sml/trunk/src/MLRISC/sparc/ra/sparcRegAlloc.sml
Parent Directory
|
Revision Log
Revision 247 -
(download)
(annotate)
Sat Apr 17 18:47:13 1999 UTC (21 years, 9 months ago) by monnier
Original Path: sml/branches/SMLNJ/src/MLRISC/sparc/ra/sparcRegAlloc.sml
File size: 2550 byte(s)
Sat Apr 17 18:47:13 1999 UTC (21 years, 9 months ago) by monnier
Original Path: sml/branches/SMLNJ/src/MLRISC/sparc/ra/sparcRegAlloc.sml
File size: 2550 byte(s)
version 110.16
(* sparcRegAlloc.sml --- sparc integer and floating register allocator * * COPYRIGHT (c) 1996 AT&T Bell Laboratories. * *) (* Integer and floating register allocators are a partial application * of a curried functor. *) functor SparcRegAlloc(structure I : INSTRUCTIONS where C = SparcCells structure P : INSN_PROPERTIES where I = I structure F : FLOWGRAPH where I = I structure Asm : EMITTER_NEW where I = I and P=F.P ) : sig functor IntRa (structure RaUser : RA_USER_PARAMS where type I.operand = I.operand and type I.instruction = I.instruction and type B.name = F.B.name) : RA functor FloatRa (structure RaUser : RA_USER_PARAMS where type I.operand = I.operand and type I.instruction = I.instruction and type B.name = F.B.name) : RA end = struct structure C=I.C (* liveness analysis for general purpose registers *) structure RegLiveness = Liveness(structure Flowgraph=F structure Instruction=I val defUse = P.defUse C.GP fun regSet c = #1 (c:SparcCells.cellset) fun cellset((_,f),r) = (r,f)) functor IntRa = RegAllocator (structure RaArch = struct structure InsnProps = P structure AsmEmitter = Asm structure I = I structure Liveness=RegLiveness val defUse = P.defUse C.GP val firstPseudoR = 32 val maxPseudoR = SparcCells.maxCell val numRegs = SparcCells.numCell SparcCells.GP fun regSet c = #1 (c:SparcCells.cellset) end) (* liveness analysis for floating point registers *) structure FregLiveness = Liveness(structure Flowgraph=F structure Instruction=I val defUse = P.defUse C.FP fun regSet c = #2 (c:SparcCells.cellset) fun cellset((r,_),f) = (r,f)) functor FloatRa = RegAllocator (structure RaArch = struct structure InsnProps = P structure AsmEmitter = Asm structure I = I structure Liveness=FregLiveness val defUse = P.defUse C.FP val firstPseudoR = 32 val maxPseudoR = SparcCells.maxCell val numRegs = SparcCells.numCell SparcCells.FP fun regSet c = #2 (c:SparcCells.cellset) end) end (* * $Log: sparcRegAlloc.sml,v $ * Revision 1.1.1.1 1999/01/04 21:56:27 george * Version 110.12 * * Revision 1.3 1998/10/06 14:06:27 george * fixed up some machine description problems. [leunga] * * Revision 1.2 1998/09/30 19:38:39 dbm * fixing sharing/defspec conflict * * Revision 1.1.1.1 1998/08/05 19:38:49 george * Release 110.7.4 * *)
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |