org.jikesrvm.compilers.opt.depgraph
Class DepGraphStats

java.lang.Object
  extended by org.jikesrvm.compilers.opt.depgraph.DepGraphStats

public class DepGraphStats
extends Object

This module provides dependence graph statistics. It will only be used for for experimental measurements, so compile-time overhead is less of a concern.

See Also:
DepGraph

Constructor Summary
DepGraphStats(DepGraph dg, String bbName)
          Create a statistical summary of a dependence graph for a given basic block.
 
Method Summary
(package private)  int estimateExecutionTime(Instruction instr)
          Return an estimate of the number of cycles for a given instruction.
static void printBasicBlockStatistics(IR ir)
          Print the dependence graph stats for all basic blocks in an IR.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepGraphStats

DepGraphStats(DepGraph dg,
              String bbName)
Create a statistical summary of a dependence graph for a given basic block.

Parameters:
dg - the dependence graph
bbName - name of the basic block
Method Detail

printBasicBlockStatistics

public static void printBasicBlockStatistics(IR ir)
Print the dependence graph stats for all basic blocks in an IR.

Parameters:
ir - the IR

estimateExecutionTime

int estimateExecutionTime(Instruction instr)
Return an estimate of the number of cycles for a given instruction. Currently, this estimate is comically simple.

Parameters:
instr - the instruction