Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /MLRISC/releases/release-110.60/instructions/freqProps.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2203 - (view) (download)

1 : jhr 1110 (* freqProps.sml
2 :     *
3 :     * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
4 :     *
5 : monnier 409 * Generic module for extracting the frequency information.
6 :     *)
7 :    
8 : jhr 1110 functor FreqProps (Props : INSN_PROPERTIES) : FREQUENCY_PROPERTIES =
9 :     struct
10 : monnier 409
11 : jhr 1110 structure I = Props.I
12 : monnier 409
13 : jhr 1110 val fifty_fifty = Probability.prob(1, 2)
14 :     val get = #get MLRiscAnnotations.BRANCH_PROB
15 : monnier 409
16 : jhr 1110 (* Branch probability *)
17 :     fun branchProb instr = (case get(#2(Props.getAnnotations instr))
18 :     of SOME b => b
19 :     | NONE => fifty_fifty
20 :     (* end case *))
21 :    
22 :     end

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