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/instructions/basicAnnotations.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/instructions/basicAnnotations.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 410 - (download) (annotate)
Fri Sep 3 00:25:03 1999 UTC (21 years, 3 months ago)
Original Path: sml/branches/SMLNJ/src/MLRISC/instructions/basicAnnotations.sml
File size: 945 byte(s)
This commit was manufactured by cvs2svn to create branch 'SMLNJ'.
 * These are some basic annotations understood by the MLRISC system
 * -- Allen

structure BasicAnnotations : BASIC_ANNOTATIONS =

    (* the branch probability of conditional branches *)
   exception BRANCH_PROB of int (* in percentage *) 

    (* the execution frequency of a basic block *)
   exception EXECUTION_FREQ of real

    (* no effect at all; just allows you to insert comments *)
   exception COMMENT of string

    (* control dependence definition and use *)
   exception CTRL_DEF of int
   exception CTRL_USE of int

   fun toString(BRANCH_PROB b)    = "branch("^Int.toString b^"%)"
     | toString(EXECUTION_FREQ r) = "freq("^Real.toString r^")"
     | toString(COMMENT s)        = s
     | toString(CTRL_DEF x)       = "ctrl-def "^Int.toString x
     | toString(CTRL_USE x)       = "ctrl-use "^Int.toString x
     | toString a                 = raise a

   val _ = Annotations.attachPrettyPrinter toString


ViewVC Help
Powered by ViewVC 1.0.0