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/src/MLRISC/block-placement/default-block-placement.sml
[smlnj] / sml / trunk / src / MLRISC / block-placement / default-block-placement.sml  
ViewVC logotype

Log of /sml/trunk/src/MLRISC/block-placement/default-block-placement.sml

Parent Directory Parent Directory

Sticky Revision:
(Current path doesn't exist after revision 2125)

Revision 1177 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 25 16:49:18 2002 UTC (17 years, 7 months ago) by jhr
File length: 3252 byte(s)
Diff to previous 1169
  Minor fixes to get the block list in a consistent form.

Revision 1169 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 22 19:22:15 2002 UTC (17 years, 7 months ago) by jhr
File length: 3196 byte(s)
Diff to previous 1168
  Fix to handle fallsthru edges to block 0.

Revision 1168 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 22 19:19:32 2002 UTC (17 years, 7 months ago) by george
File length: 3235 byte(s)
Diff to previous 1165
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

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

	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.

Revision 1165 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 22 16:31:37 2002 UTC (17 years, 7 months ago) by george
File length: 3232 byte(s)
Diff to previous 1162
 treat entry and exit nodes specially

Revision 1162 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 22 15:16:46 2002 UTC (17 years, 7 months ago) by jhr
File length: 3189 byte(s)
Diff to previous 1157
  Added methods to get unique entry and exit blocks.

Revision 1157 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 21 22:33:35 2002 UTC (17 years, 7 months ago) by jhr
File length: 3375 byte(s)
Diff to previous 1133
  New default block placement that respects edge kinds.

Revision 1133 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 12 03:56:23 2002 UTC (17 years, 7 months ago) by george
File length: 998 byte(s)
Diff to previous 906
Tested the jump chain elimination on all architectures (except the
hppa).  This is on by default right now and is profitable for the
alpha and x86, however, it may not be profitable for the sparc and ppc
when compiling the compiler.

The gc test will typically jump to a label at the end of the cluster,
where there is another jump to an external cluster containing the actual
code to invoke gc. This is to allow factoring of common gc invocation
sequences. That is to say, we generate:

	   ja	L1	% jump if above to L1

	   jmp L2

After jump chain elimination the 'ja L1' instructions is converted to
'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
up being implemented in their long form (if L2 is far away) using:

	jbe	L3	% jump if below or equal to L3
        jmp 	L2

For large compilation units L2  may be far away.

Revision 906 - (view) (download) (annotate) - [select for diffs]
Added Fri Aug 24 17:36:40 2001 UTC (18 years, 2 months ago) by george
File length: 677 byte(s)
Initial revision

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:

ViewVC Help
Powered by ViewVC 1.0.0