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

Diff of /sml/trunk/src/MLRISC/hppa/instructions/hppaFreqProps.sml

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

revision 1002, Fri Nov 30 17:11:33 2001 UTC revision 1003, Fri Dec 7 02:45:32 2001 UTC
# Line 9  Line 9 
9    
10     structure I = HppaInstr     structure I = HppaInstr
11    
12       fun hppaBranchProb(I.BCOND{cmp=I.COMBT,bc=I.EQ,...}) = 10
13         | hppaBranchProb(I.BCOND{cmp=I.COMBF,bc=I.EQ,...}) = 90
14         | hppaBranchProb(I.BCOND{cmp=I.COMBT,bc=I.NE,...}) = 90
15         | hppaBranchProb(I.BCOND{cmp=I.COMBF,bc=I.NE,...}) = 10
16         | hppaBranchProb(I.BCONDI{cmpi=I.COMIBT,bc=I.EQ,...}) = 10
17         | hppaBranchProb(I.BCONDI{cmpi=I.COMIBF,bc=I.EQ,...}) = 90
18         | hppaBranchProb(I.BCONDI{cmpi=I.COMIBT,bc=I.NE,...}) = 90
19         | hppaBranchProb(I.BCONDI{cmpi=I.COMIBF,bc=I.NE,...}) = 10
20         | hppaBranchProb(I.BCOND _) = 50 (* default *)
21         | hppaBranchProb(I.BCONDI _) = 50 (* default *)
22         | hppaBranchProb(I.FBRANCH _) = 50 (* default *)
23         (*| hppaBranchProb(I.BB{bc=I.BCLR, p=31, ...}) = 10
24         | hppaBranchProb(I.BB{bc=I.BSET, p=31, ...}) = 90 *)
25         | hppaBranchProb(I.BB _) = 50 (* branch on bit *)
26         | hppaBranchProb(I.B _) = 100 (* unconditional *)
27         | hppaBranchProb(I.BE{labs=[], ...}) = 100 (* escapes *)
28         | hppaBranchProb(I.BE{labs,...}) = 100 div length labs (* assume equal prob *)
29         | hppaBranchProb(I.BV{labs=[],...}) = 100 (* escapes *)
30         | hppaBranchProb(I.BV{labs,...}) = 100 div length labs (* assume equal prob *)
31         | hppaBranchProb(I.BLR{labs,...}) = 100 div length labs (* assume equal prob *)
32         | hppaBranchProb _ = 0 (* non-branch *)
33     fun branchProb(I.ANNOTATION{a, i, ...}) =     fun branchProb(I.ANNOTATION{a, i, ...}) =
34           (case #peek MLRiscAnnotations.BRANCH_PROB a of           (case #peek MLRiscAnnotations.BRANCH_PROB a of
35              SOME b => b              SOME b => b
36            | NONE => branchProb i            | NONE => branchProb i
37           )           )
38       | branchProb(I.BCOND{cmp=I.COMBT,bc=I.EQ,...}) = 10       | branchProb(I.INSTR(i)) = hppaBranchProb(i)
39       | branchProb(I.BCOND{cmp=I.COMBF,bc=I.EQ,...}) = 90       | branchProb _ = 0
      | branchProb(I.BCOND{cmp=I.COMBT,bc=I.NE,...}) = 90  
      | branchProb(I.BCOND{cmp=I.COMBF,bc=I.NE,...}) = 10  
      | branchProb(I.BCONDI{cmpi=I.COMIBT,bc=I.EQ,...}) = 10  
      | branchProb(I.BCONDI{cmpi=I.COMIBF,bc=I.EQ,...}) = 90  
      | branchProb(I.BCONDI{cmpi=I.COMIBT,bc=I.NE,...}) = 90  
      | branchProb(I.BCONDI{cmpi=I.COMIBF,bc=I.NE,...}) = 10  
      | branchProb(I.BCOND _) = 50 (* default *)  
      | branchProb(I.BCONDI _) = 50 (* default *)  
      | branchProb(I.FBRANCH _) = 50 (* default *)  
      (*| branchProb(I.BB{bc=I.BCLR, p=31, ...}) = 10  
      | branchProb(I.BB{bc=I.BSET, p=31, ...}) = 90 *)  
      | branchProb(I.BB _) = 50 (* branch on bit *)  
      | branchProb(I.B _) = 100 (* unconditional *)  
      | branchProb(I.BE{labs=[], ...}) = 100 (* escapes *)  
      | branchProb(I.BE{labs,...}) = 100 div length labs (* assume equal prob *)  
      | branchProb(I.BV{labs=[],...}) = 100 (* escapes *)  
      | branchProb(I.BV{labs,...}) = 100 div length labs (* assume equal prob *)  
      | branchProb(I.BLR{labs,...}) = 100 div length labs (* assume equal prob *)  
      | branchProb _ = 0 (* non-branch *)  
40    
41  end  end

Legend:
Removed from v.1002  
changed lines
  Added in v.1003

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