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/branches/SMLNJ/src/compiler/MLRISC-OPTIMIZER.cm
ViewVC logotype

View of /sml/branches/SMLNJ/src/compiler/MLRISC-OPTIMIZER.cm

Parent Directory Parent Directory | Revision Log Revision Log

Revision 475 - (download) (annotate)
Wed Nov 10 22:59:58 1999 UTC (21 years, 1 month ago) by monnier
File size: 2431 byte(s)
version 110.24
(* This file is intended to load MLRISC optimization modules within
 * the toplevel interactive loop. At present various compiler data
 * structures can be graphically viewed. 

(* The following steps are required:
     daVinci: ftp://ftp.uni-bremen.de/pub/graphics/daVinci, 
     vcg: http://www.cs.uni-sb.de/RW/users/sander/html/gsvcg1.html

  1. Load the optimizer sources:

	CM.make "src/compiler/MLRISC-OPTIMIZER.cm";

  2. At the top level execute:

       structure M = Compiler.Control.MLRISC;

       M.mlrisc :=true;				(* enable optimizer *)
       M.getString "viewer" := "daVinci";	(* set viewer *)
       M.getFlag "view-IR" := true;		(* enable viewer *)
       M.mlrisc_phases :=			(* set phases *)
	 ["cluster->cfg", "view-dom", "cfg->cluster"];

  3. Compiling anything from here onwards, will go through the 

  Currently, the optimizer uses two different representations:
  the cluster and the IR.  The cluster is the old representation used
  in the register allocator and instruction selection.  The IR
  is the new representation.  Most new optimizations operate on
  the new IR.

  Several phases are possible in the mlrisc_phases list such as:

   a. view-cfg  -- view control flow graph
   b. view-dom  -- view dominator tree
   c. view-pdom -- view post dominator tree
   d. view-doms -- view dominator tree and post dominator tree together.
                   The post dominator is upside down.
   e. view-cdg  -- view control dependence graph
   f. view-loop -- show loop nesting tree
   g. guess     -- apply static branch prediction
                   (this need better machine descriptions)
   h. reshape   -- reorder the branch structure using frequencies 
                    gathered by static branch prediction

  All phases above transform IR into IR, so 
  they must be enclosed in phases "cluster->cfg", and "cfg->cluster",
  which translate clusters into IRs and vice versa.  In addition,
  there is a phase "copy-prop", which performs copy propagation on

  structure Compiler
  structure MLRISCOptimizer


	(* Could use the anchors to eliminate the path *)


ViewVC Help
Powered by ViewVC 1.0.0