scale.backend.trips2
Class HyperblockFormation

java.lang.Object
  extended by scale.backend.trips2.HyperblockFormation

public class HyperblockFormation
extends java.lang.Object

Backend hyperblock formation.

$Id: HyperblockFormation.java,v 1.57 2007-10-31 16:39:16 bmaher Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.


Field Summary
static boolean analyze
          True: print analysis of merging attempts.
static boolean debug
          True: print debugging information.
static boolean duplicateReturn
          True: allow the return block to be tail duplicated.
static boolean enableHyperblockFormation
          True: perform hyperblock formation.
static boolean includeCalls
          True: allow function calls to be predicated.
static boolean makeDotFiles
          True: produces dot files, used for producing a graphical HFG.
static boolean peelLoops
          True: perform loop peeling during hyperblock formation.
static boolean tailDuplicate
          True: perform tail duplication during hyperblock formation.
static double threshold
          Threshold for excluding basic blocks from a hyperblock.
static boolean unrollForLoops
          True: perform for loop unrolling during hyperblock formation.
static boolean unrollLoops
          True: perform loop unrolling during hyperblock formation.
static boolean useProfile
          True: use profiling information (if available) to decide which regions to place into a hyperblock.
 
Constructor Summary
HyperblockFormation(Trips2Generator gen, Hyperblock hbStart, boolean beforeRegisterAllocation)
          The default constructor.
 
Method Summary
 Hyperblock createHyperblocks()
          The main routine.
 Hyperblock mergeEpilogue(Hyperblock block)
          Merges the epilogue after stack frame generation.
 Hyperblock mergePrologueEpilogue(Hyperblock block)
          Used to merge the prologue and epilogue during stack frame generation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enableHyperblockFormation

public static boolean enableHyperblockFormation
True: perform hyperblock formation.


debug

public static boolean debug
True: print debugging information.


analyze

public static boolean analyze
True: print analysis of merging attempts.


makeDotFiles

public static boolean makeDotFiles
True: produces dot files, used for producing a graphical HFG.


useProfile

public static boolean useProfile
True: use profiling information (if available) to decide which regions to place into a hyperblock.


threshold

public static double threshold
Threshold for excluding basic blocks from a hyperblock.


peelLoops

public static boolean peelLoops
True: perform loop peeling during hyperblock formation.


unrollLoops

public static boolean unrollLoops
True: perform loop unrolling during hyperblock formation.


unrollForLoops

public static boolean unrollForLoops
True: perform for loop unrolling during hyperblock formation.


tailDuplicate

public static boolean tailDuplicate
True: perform tail duplication during hyperblock formation.


includeCalls

public static boolean includeCalls
True: allow function calls to be predicated.


duplicateReturn

public static boolean duplicateReturn
True: allow the return block to be tail duplicated.

Constructor Detail

HyperblockFormation

public HyperblockFormation(Trips2Generator gen,
                           Hyperblock hbStart,
                           boolean beforeRegisterAllocation)
The default constructor.

Method Detail

createHyperblocks

public Hyperblock createHyperblocks()
The main routine.


mergePrologueEpilogue

public Hyperblock mergePrologueEpilogue(Hyperblock block)
Used to merge the prologue and epilogue during stack frame generation.


mergeEpilogue

public Hyperblock mergeEpilogue(Hyperblock block)
Merges the epilogue after stack frame generation. Can perform tail duplication if necessary.