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/cluster/flowgraph.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/cluster/flowgraph.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 246 - (download) (annotate)
Sat Apr 17 18:47:12 1999 UTC (20 years, 5 months ago) by monnier
File size: 2079 byte(s)
This commit was generated by cvs2svn to compensate for changes in r245,
which included commits to RCS files with non-trunk default branches.
(* flowgraph.sml
 *
 * COPYRIGHT (c) 1995 AT&T Bell Laboratories.
 *
 * Defines the flowgraph data structure used as the intermediate program
 * representation.
 *
 *)

signature FLOWGRAPH = sig

  structure B : BLOCK_NAMES
  structure C : CELLS
  structure I : INSTRUCTIONS
  structure P : PSEUDO_OPS
	  sharing I.C = C



  datatype block =
      PSEUDO of P.pseudo_op
    | LABEL of Label.label
    | BBLOCK of { blknum  : int,
		  name    : B.name,
		  liveIn  : C.cellset ref,
		  liveOut : C.cellset ref,
		  succ 	  : block list ref,
		  pred 	  : block list ref,
		  insns	  : I.instruction list ref
	        }
    | ENTRY of {blknum : int,
		succ : block list ref}
    | EXIT of {blknum : int,
	       pred : block list ref}
    | ORDERED of block list

  datatype cluster = 
      CLUSTER of {
        blocks: block list, 
	entry : block,
	exit  : block,	  
        regmap: int Intmap.intmap,
        blkCounter : int ref
      }
end


(*  Create the flowgraph data structure specialized towards	
 *  a specific type of cells and instructions.
 *)
functor FlowGraph(structure I : INSTRUCTIONS
		  structure P : PSEUDO_OPS
		  structure B : BLOCK_NAMES) : FLOWGRAPH = 
struct
  structure I = I
  structure C = I.C
  structure P = P
  structure B = B

  datatype block =
      PSEUDO of P.pseudo_op
    | LABEL of Label.label
    | BBLOCK of { blknum  : int,
		  name    : B.name,
		  liveIn  : C.cellset ref,
		  liveOut : C.cellset ref,
		  succ 	  : block list ref,
		  pred 	  : block list ref,
		  insns	  : I.instruction list ref
	        }
    | ENTRY of {blknum : int,
		succ : block list ref}
    | EXIT of {blknum : int,
	       pred : block list ref}
    | ORDERED of block list

  datatype cluster = 
      CLUSTER of {
        blocks: block list, 
	entry : block,
	exit  : block,	  
        regmap: int Intmap.intmap,
        blkCounter : int ref
      }
end




(*
 * $Log: flowgraph.sml,v $
 * Revision 1.2  1998/07/25 03:08:18  george
 *   added to support block names in MLRISC
 *
 * Revision 1.1.1.1  1998/04/08 18:39:02  george
 * Version 110.5
 *
 *)

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