SCM Repository
[smlnj] / sml / trunk / src / MLRISC / instructions / freqProps.sml |
View of /sml/trunk/src/MLRISC/instructions/freqProps.sml
Parent Directory
|
Revision Log
Revision 1110 -
(download)
(annotate)
Fri Mar 1 14:07:58 2002 UTC (20 years, 4 months ago) by jhr
File size: 510 byte(s)
Fri Mar 1 14:07:58 2002 UTC (20 years, 4 months ago) by jhr
File size: 510 byte(s)
Switch to using probabilities (instead of ints) for BRANCH_PROB annotation.
(* 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 |