coins.opt
Class CommonSubexpElimHir

java.lang.Object
  extended bycoins.opt.CommonSubexpElim
      extended bycoins.opt.CommonSubexpElimHir
Direct Known Subclasses:
CommonSubexpElimHirE

public class CommonSubexpElimHir
extends CommonSubexpElim

This class performs common subexpresssion elimination operations that are specific to HIR.


Field Summary
protected  java.util.Map fGlobalExpTempMap
          fGlobalExpTempMap key: ExpId, value: Global mapping (within a subprogram) of ExpId and temporal variable used to replace the corresponding expression.
protected  java.util.Map fGlobalTempExpMap
          fGlobalTempExpMap key: Temporal variable, value: Global mapping (within a subprogram) of temporal variable and ExpId used to replace the corresponding expression.
 HIR hir
           
 
Fields inherited from class coins.opt.CommonSubexpElim
fDbgLevel, fFunctionsWithoutSideEffect, flowRoot, fSubpFlow, sym, symRoot
 
Constructor Summary
CommonSubexpElimHir(FlowRoot pFlowRoot)
           
 
Method Summary
(package private)  HIR eliminateComplex(HIR pCompoundNode, HIR pPrevCompoundNode, SetRefRepr pPrevCalcSetRefRepr, SetRefReprList pSetRefReprs, java.util.Map pCompoundToNodeAndSetRefRepr, java.util.Map pContainsMap)
           
(package private)  HIR eliminateSimple(HIR pCompoundNode, HIR pVarNode, SubpFlow pSubpFlow, java.util.Set pModSyms, boolean pMod)
           
(package private)  java.util.Set operandSet(java.lang.Object o)
           
 void recordTempExpCorrespondence(Var pTempVar, Exp pExp)
           
protected  void registerUseSyms(HIR pSubtree, java.util.Map pContainsMap, java.lang.Object pCompound)
           
(package private)  void reregisterSubexps(java.lang.Object pCompound, SetRefRepr pSetRefRepr, java.util.Map pCompoundToNodeAndSetRefRepr)
           
 
Methods inherited from class coins.opt.CommonSubexpElim
doBBlockLocal, doBBlockLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hir

public final HIR hir

fGlobalExpTempMap

protected java.util.Map fGlobalExpTempMap
fGlobalExpTempMap key: ExpId, value: Global mapping (within a subprogram) of ExpId and temporal variable used to replace the corresponding expression. This is used for common subexpression elimination invoked by partial redundancy elimination.


fGlobalTempExpMap

protected java.util.Map fGlobalTempExpMap
fGlobalTempExpMap key: Temporal variable, value: Global mapping (within a subprogram) of temporal variable and ExpId used to replace the corresponding expression. This is used for common subexpression elimination invoked by partial redundancy elimination.

Constructor Detail

CommonSubexpElimHir

public CommonSubexpElimHir(FlowRoot pFlowRoot)
Method Detail

eliminateSimple

HIR eliminateSimple(HIR pCompoundNode,
                    HIR pVarNode,
                    SubpFlow pSubpFlow,
                    java.util.Set pModSyms,
                    boolean pMod)
Specified by:
eliminateSimple in class CommonSubexpElim

eliminateComplex

HIR eliminateComplex(HIR pCompoundNode,
                     HIR pPrevCompoundNode,
                     SetRefRepr pPrevCalcSetRefRepr,
                     SetRefReprList pSetRefReprs,
                     java.util.Map pCompoundToNodeAndSetRefRepr,
                     java.util.Map pContainsMap)
Specified by:
eliminateComplex in class CommonSubexpElim

registerUseSyms

protected void registerUseSyms(HIR pSubtree,
                               java.util.Map pContainsMap,
                               java.lang.Object pCompound)
Specified by:
registerUseSyms in class CommonSubexpElim

operandSet

java.util.Set operandSet(java.lang.Object o)
Specified by:
operandSet in class CommonSubexpElim

reregisterSubexps

void reregisterSubexps(java.lang.Object pCompound,
                       SetRefRepr pSetRefRepr,
                       java.util.Map pCompoundToNodeAndSetRefRepr)

recordTempExpCorrespondence

public void recordTempExpCorrespondence(Var pTempVar,
                                        Exp pExp)