| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.backend.trips2.Trips2Allocator
scale.backend.trips2.Trips2AllocatorHybrid
public class Trips2AllocatorHybrid
This class implements a hybrid version of the trips register allocator.
$Id: Trips2AllocatorHybrid.java,v 1.3 2007-07-27 16:09:49 beroy Exp $
 Copyright 2005 by the Scale Compiler Group,
 Department of Computer Science
 University of Massachusetts,
 Amherst MA. 01003, USA
 All Rights Reserved.
 
 This allocator is based upon QDRA.
 It is different in that it only allocates registers for the virtual registers
 that are alive across basic block boundaries.  The virtual registers that are
 used only within a single basic block are not allocated.
 
 This allocator first allocates virtual registers from shortest to longest
 liveranges.  If there are any spills, it redoes the allocation in reverse
 order, from longest to shortest liveranges and then picks the allocation 
 with the fewest spills.
 
| Field Summary | |
|---|---|
| static boolean | enabledTrue: use the hybrid register allocator. | 
| Fields inherited from class scale.backend.trips2.Trips2Allocator | 
|---|
| blocksDefdIn, blocksUsedIn, finalSpillCount, finalSpillLdCnt, finalSpillStCnt, hbs, LBSA2, map, maxVRCount, redoCount, sorted, spillCount, spilled, strengths, tLiveIn, tLiveOut, tLiveUse, trace, unallocated | 
| Constructor Summary | |
|---|---|
| Trips2AllocatorHybrid(Generator gen,
                      Hyperblock hbStart,
                      boolean trace)Setup a quick & dirty register allocation. | |
| Method Summary | |
|---|---|
|  int[] | allocate()Determine a mapping from virtual registers to real registers. | 
| protected  void | computeStrength(int numVirtual,
                int numReal)Determine the importance of each register. | 
| Methods inherited from class scale.backend.trips2.Trips2Allocator | 
|---|
| allocateRealRegisters, computeLiveness, computeStats, computeStrengthBlockSize, initialize, maxVirtualRegs, meekSpill, redo, spillLoads, spills, spillStores | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static boolean enabled
| Constructor Detail | 
|---|
public Trips2AllocatorHybrid(Generator gen,
                             Hyperblock hbStart,
                             boolean trace)
gen - is the instruction generator in usehbStart - is the entry to the hyperblock flow graphtrace - is true if the register allocation should be traced| Method Detail | 
|---|
public int[] allocate()
allocate in class Trips2Allocator
protected void computeStrength(int numVirtual,
                               int numReal)
computeStrength in class Trips2Allocator| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||