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 /MLRISC/releases/release-110.60/instructions/freqProps.sml
ViewVC logotype

View of /MLRISC/releases/release-110.60/instructions/freqProps.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2203 - (download) (annotate)
Thu Nov 9 21:29:12 2006 UTC (12 years, 11 months ago) by blume
File size: 510 byte(s)
Release 110.60
(* freqProps.sml
 *
 * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
 *
 * Generic module for extracting the frequency information.
 *)

functor FreqProps (Props : INSN_PROPERTIES) : FREQUENCY_PROPERTIES =
  struct

    structure I = Props.I

    val fifty_fifty = Probability.prob(1, 2)
    val get = #get MLRiscAnnotations.BRANCH_PROB

  (* Branch probability *)
    fun branchProb instr = (case get(#2(Props.getAnnotations instr))
	   of SOME b => b
	    | NONE => fifty_fifty
	  (* end case *))

  end

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