org.jikesrvm.compilers.opt
Class LocalCSE.AvailableExpression

java.lang.Object
  extended by org.jikesrvm.compilers.opt.LocalCSE.AvailableExpression
Enclosing class:
LocalCSE

private static final class LocalCSE.AvailableExpression
extends Object

A tuple to record an Available Expression


Field Summary
(package private)  Instruction inst
          the instruction which makes this expression available
(package private)  LocationOperand location
          location operand for memory (load/store) expressions
(package private)  Operator opr
          the operator of the expression
(package private)  Operand[] ops
          operands
(package private)  Register tmp
          temporary register holding the result of the available expression
 
Constructor Summary
LocalCSE.AvailableExpression(Instruction i, Operator op, Operand[] ops, LocationOperand loc, Register t)
           
 
Method Summary
 boolean equals(Object o)
          Two AEs are "equal" iff for unary, binary and ternary expressions: the operator and the operands match for loads and stores: if the 2 operands and the location match
 int hashCode()
          Unused hashcode method
private  boolean isBoundsCheck()
          Does this expression represent the result of a bounds check?
private  boolean isCommutative()
          Is this expression commutative?
 boolean isLoad()
          Does this expression represent the result of a load?
 boolean isLoadOrStore()
          Does this expression represent the result of a load or store?
 boolean isStore()
          Does this expression represent the result of a store?
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inst

final Instruction inst
the instruction which makes this expression available


opr

final Operator opr
the operator of the expression


ops

final Operand[] ops
operands


location

final LocationOperand location
location operand for memory (load/store) expressions


tmp

Register tmp
temporary register holding the result of the available expression

Constructor Detail

LocalCSE.AvailableExpression

LocalCSE.AvailableExpression(Instruction i,
                             Operator op,
                             Operand[] ops,
                             LocationOperand loc,
                             Register t)
Parameters:
i - the instruction which makes this expression available
op - the operator of the expression
ops - the operands
loc - location operand for memory (load/store) expressions
t - temporary register holding the result of the available expression
Method Detail

equals

public boolean equals(Object o)
Two AEs are "equal" iff

Overrides:
equals in class Object

hashCode

public int hashCode()
Unused hashcode method

Overrides:
hashCode in class Object

isLoadOrStore

public boolean isLoadOrStore()
Does this expression represent the result of a load or store?


isLoad

public boolean isLoad()
Does this expression represent the result of a load?


isStore

public boolean isStore()
Does this expression represent the result of a store?


isBoundsCheck

private boolean isBoundsCheck()
Does this expression represent the result of a bounds check?


isCommutative

private boolean isCommutative()
Is this expression commutative?