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

Diff of /sml/trunk/src/MLRISC/x86/instructions/x86FreqProps.sml

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

sml/branches/SMLNJ/src/MLRISC/x86/instructions/x86FreqProps.sml revision 469, Wed Nov 10 22:42:52 1999 UTC sml/trunk/src/MLRISC/x86/instructions/x86FreqProps.sml revision 1121, Wed Mar 6 19:58:56 2002 UTC
# Line 8  Line 8 
8    
9     structure I = X86Instr     structure I = X86Instr
10    
11     fun branchProb(I.ANNOTATION{a, i, ...}) =     fun x86BranchProb(I.JCC{cond=I.EQ,...}) = 10
12          (case #peek BasicAnnotations.BRANCH_PROB a of       | x86BranchProb(I.JCC{cond=I.O,...}) = 0 (* overflow *)
13         | x86BranchProb(I.JCC{cond=I.NE,...}) = 90
14         | x86BranchProb(I.JCC{cond=I.NO,...}) = 100
15         | x86BranchProb(I.JCC _) = 50 (* default *)
16         | x86BranchProb(I.JMP _) = 100
17         | x86BranchProb _ = 0 (* non-branch *)
18    
19       and branchProb(I.ANNOTATION{a, i, ...}) =
20            (case #peek MLRiscAnnotations.BRANCH_PROB a of
21             SOME b => b             SOME b => b
22           | NONE => branchProb i           | NONE => branchProb i
23          )          )
24       | branchProb(I.JCC{cond=I.EQ,...}) = 10       | branchProb (I.INSTR i) = Probability.percent (x86BranchProb i)
25       | branchProb(I.JCC{cond=I.O,...}) = 0 (* overflow *)       | branchProb _ = Probability.never
      | branchProb(I.JCC{cond=I.NE,...}) = 90  
      | branchProb(I.JCC{cond=I.NO,...}) = 100  
      | branchProb(I.JCC _) = 50 (* default *)  
      | branchProb(I.JMP _) = 100  
      | branchProb _ = 0 (* non-branch *)  
   
26  end  end
27    

Legend:
Removed from v.469  
changed lines
  Added in v.1121

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