scale.backend.trips2
Class Peepholer

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

public class Peepholer
extends java.lang.Object

This is the Peephole optimizer for TRIPS.

$Id: Peepholer.java,v 1.51 2007-10-04 19:57:59 burrill Exp $

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


Constructor Summary
Peepholer(Hyperblock hbStart, boolean afterAlloc)
          The constructor.
 
Method Summary
static int peepAddiAddi()
          Return the number of times the addiAddi pattern was used.
static int peepAddiLoadStore()
          Return the number of times the addiLoadStore pattern was used.
static int peepEnter0()
          Return the number of times the mov0 pattern was used.
static int peepExtExt()
          Return the number of times the extExt pattern was used.
static int peepExtStore()
          Return the number of times the extStore pattern was used.
protected  void peephole()
          Run the peepholer.
 void peephole(Hyperblock hb)
          Peephole a hyperblock.
static int peepImmediate0or1()
          Return the number of times an instruction with an immediate of 0 or 1 was removed.
static int peepMovMov()
          Return the number of times the movMov pattern was used.
static int peepReadWrite()
          Return the number of times the readWrite pattern was used.
static int peepTestTest()
          Return the number of times the testTnei0 pattern was used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Peepholer

public Peepholer(Hyperblock hbStart,
                 boolean afterAlloc)
The constructor.

Method Detail

peepAddiLoadStore

public static int peepAddiLoadStore()
Return the number of times the addiLoadStore pattern was used.


peepMovMov

public static int peepMovMov()
Return the number of times the movMov pattern was used.


peepEnter0

public static int peepEnter0()
Return the number of times the mov0 pattern was used.


peepExtExt

public static int peepExtExt()
Return the number of times the extExt pattern was used.


peepAddiAddi

public static int peepAddiAddi()
Return the number of times the addiAddi pattern was used.


peepReadWrite

public static int peepReadWrite()
Return the number of times the readWrite pattern was used.


peepImmediate0or1

public static int peepImmediate0or1()
Return the number of times an instruction with an immediate of 0 or 1 was removed.


peepExtStore

public static int peepExtStore()
Return the number of times the extStore pattern was used.


peepTestTest

public static int peepTestTest()
Return the number of times the testTnei0 pattern was used.


peephole

protected void peephole()
Run the peepholer.


peephole

public final void peephole(Hyperblock hb)
Peephole a hyperblock.