harpoon.Analysis.LowQuad.Loop
Class LoopAnalysis

java.lang.Object
  extended by harpoon.Analysis.LowQuad.Loop.LoopAnalysis
All Implemented Interfaces:
AllInductionsMap, BasicInductionsMap, InvariantsMap

public class LoopAnalysis
extends Object
implements AllInductionsMap, BasicInductionsMap, InvariantsMap

LoopAnalysis implements AllInductionsMap, BasicInductionsMap, and InvariantsMap.

Version:
$Id: LoopAnalysis.java,v 1.5 2004/02/08 01:52:54 cananian Exp $
Author:
Brian Demsky <bdemsky@mit.edu>

Nested Class Summary
 class LoopAnalysis.ForLoopInfo
          ForLoopInfo encapsulated information on a for loop.
 
Constructor Summary
LoopAnalysis(TempMap tm)
          Creates a LoopAnalysis.
 
Method Summary
 Map allInductionsMap(HCode hc, Loops lp)
          Returns a Set of basic induction Temps.
 Map basicInductionsMap(HCode hc, Loops lp)
          Returns a Set of basic induction Temps.
 LoopAnalysis.ForLoopInfo forloop(HCode hc, Loops lp)
          forloop takes in an HCode and Loops to analyze.
 Set invariantsMap(HCode hc, Loops lp)
          Returns a Set of invariant loop elements.
 Loops rootloop(HCode hc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopAnalysis

public LoopAnalysis(TempMap tm)
Creates a LoopAnalysis. Takes in a TempMap that for SSI forms needs to map SSI->SSA.

Method Detail

rootloop

public Loops rootloop(HCode hc)

allInductionsMap

public Map allInductionsMap(HCode hc,
                            Loops lp)
Description copied from interface: AllInductionsMap
Returns a Set of basic induction Temps.

Specified by:
allInductionsMap in interface AllInductionsMap

basicInductionsMap

public Map basicInductionsMap(HCode hc,
                              Loops lp)
Description copied from interface: BasicInductionsMap
Returns a Set of basic induction Temps.

Specified by:
basicInductionsMap in interface BasicInductionsMap

invariantsMap

public Set invariantsMap(HCode hc,
                         Loops lp)
Description copied from interface: InvariantsMap
Returns a Set of invariant loop elements.

Specified by:
invariantsMap in interface InvariantsMap

forloop

public LoopAnalysis.ForLoopInfo forloop(HCode hc,
                                        Loops lp)
forloop takes in an HCode and Loops to analyze. It returns a null if there is no for loop, or a ForLoopInfo if it finds a for loop. It works on Quads and LowQuads on both SSI and SSA forms.