Debian Codegraph @

lib/mlrisc-lib/MLRISC/ir-archive/compute-freq2.sig

raw
1 (*
2 * This module computes frequencies when given branch probabilities
3 * It has been generalized from the old static branch predication
4 * so that it can be applied to other graph based reprensentations.
5 *
6 * -- Allen
7 *)
8
9 signature COMPUTE_FREQUENCIES2 =
10 sig
11
12 structure Derived : DERIVED_GRAPH
13 structure W : FREQ
14
15 val compute_frequencies :
16 { cfg : ('n,'e,'g) Graph.graph,
17 derived : ('n,'e) Derived.derived_graph,
18 (* multiplier for each loop nesting *)
19 loopMultiplier : int,
20 nodeFreq : 'n -> W.freq ref, (* frequency of a node *)
21 edgeFreq : 'e -> W.freq ref, (* frequency of an edge *)
22 branchProb : 'n -> int, (* branch probability of a node *)
23 (* is the edge a taken branch edge? *)
24 isTakenBranch : 'e Graph.edge -> bool
25 } -> unit
26
27 end