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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/instructions/freqProps.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/instructions/freqProps.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1109, Fri Mar 1 13:56:06 2002 UTC revision 1110, Fri Mar 1 14:07:58 2002 UTC
# Line 1  Line 1 
1  (*  (* freqProps.sml
2     *
3     * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
4     *
5   * Generic module for extracting the frequency information.   * Generic module for extracting the frequency information.
6   *)   *)
7    
# Line 7  Line 10 
10    
11     structure I = Props.I     structure I = Props.I
12    
13        (* Branch probability in percentage *)      val fifty_fifty = Probability.prob(1, 2)
14     fun branchProb instr =      val get = #get MLRiscAnnotations.BRANCH_PROB
15        case #get MLRiscAnnotations.BRANCH_PROB  
16             (#2(Props.getAnnotations instr)) of    (* Branch probability *)
17          SOME b => b      fun branchProb instr = (case get(#2(Props.getAnnotations instr))
18        | NONE => 50             of SOME b => b
19                | NONE => fifty_fifty
20              (* end case *))
21    
22  end  end

Legend:
Removed from v.1109  
changed lines
  Added in v.1110

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