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

SCM Repository

[smlnj] Log of /sml/trunk/compiler/CodeGen/cpscompile/cpsBranchProb.sml
[smlnj] / sml / trunk / compiler / CodeGen / cpscompile / cpsBranchProb.sml  
ViewVC logotype

Log of /sml/trunk/compiler/CodeGen/cpscompile/cpsBranchProb.sml

Parent Directory Parent Directory


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 4540 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 25 17:06:35 2018 UTC (17 months, 3 weeks ago) by jhr
File length: 7364 byte(s)
Diff to previous 4527
  Use RealConst.t representation in FLINT and CPS IRs.

Revision 4527 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 14 14:41:11 2018 UTC (18 months ago) by jhr
File length: 7353 byte(s)
Diff to previous 4523
  Switched the representation of real literals from strings to the
  RealLit.t type.  This change is the first step toward fixing
  bug #191 and supporting 32-bit reals.

Revision 4523 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 13 14:41:33 2018 UTC (18 months ago) by jhr
File length: 7346 byte(s)
Diff to previous 2162
  Removed real patterns from Absyn and FLINT, since they are not allowed by SML'93.

Revision 2162 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 2 21:20:47 2006 UTC (12 years, 11 months ago) by blume
File length: 7404 byte(s)
Diff to previous 1755
eliminated src dir

Revision 1755 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 10 23:54:06 2005 UTC (14 years, 8 months ago) by mblume
Original Path: sml/trunk/src/compiler/CodeGen/cpscompile/cpsBranchProb.sml
File length: 7404 byte(s)
Diff to previous 1174
long long results implemented

Revision 1174 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 23 21:14:40 2002 UTC (17 years, 6 months ago) by leunga
Original Path: sml/trunk/src/compiler/CodeGen/cpscompile/cpsBranchProb.sml
File length: 7407 byte(s)
Diff to previous 1168

    Added some new primops for creating/manipulating temporary "C" objects
    allocated on the ml heap.

Revision 1168 - (view) (download) (annotate) - [select for diffs]
Added Fri Mar 22 19:19:32 2002 UTC (17 years, 6 months ago) by george
Original Path: sml/trunk/src/compiler/CodeGen/cpscompile/cpsBranchProb.sml
File length: 7401 byte(s)
Implemented the Ball-Larus branch prediction-heuristic, and
incorporated graphical viewers for control flow graphs.

Ball-Larus Heuristic:
---------------------
See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.

By design it uses the Dempster-Shafer theory for combining
probabilities.  For example, in the function:

    fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)

the ball-larus heuristics predicts that the n=0 is unlikely
(OH-heuristic), and the 'then' branch is unlikely because of the
RH-heuristic -- giving the 'then' branch an even lower combined
probability using the Dempster-Shater theory.

Finally, John Reppy's loop analysis in MLRISC, further lowers the
probability of the 'then' branch because of the loop in the else
branch.


Graphical Viewing:
------------------
I merely plugged in Allen's graphical viewers into the compiler. The
additional code is not much. At the top level, saying:

	Control.MLRISC.getFlag "cfg-graphical-view" := true;

will display the graphical view of the control flow graph just before
back-patching.  daVinci must be in your path for this to work. If
daVinci is not available, then the default viewer can be changed
using:

	Control.MLRISC.getString "viewer"

which can be set to "dot" or "vcg" for the corresponding viewers. Of
course, these viewers must be in your path.

The above will display the compilation unit at the level of clusters,
many of which are small, boring, and un-interesting. Also setting:

	Control.MLRISC.getInt "cfg-graphical-view_size"

will display clusters that are larger than the value set by the above.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

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