at.dms.kjc.rstream
Class ConvertChannelExprsMIV

java.lang.Object
  extended by at.dms.kjc.rstream.ConvertChannelExprsMIV

public class ConvertChannelExprsMIV
extends Object

This class will try to convert the communication expressions of a filter (push, pop, and peek) into buffer accesses that are indexed by a linear function of the expression's enclosing loop indcution variables (MIVs). It performs the conversion inplace. It handles pop/peek separately. It will succeed for pops/peeks if all pops are enclosed only in analyzable control flow, which is incrementing doloops with static bounds or if/then/else statements and the rate on each branch of an if are equal. Push statements are complementary.

Author:
Michael Gordon

Constructor Summary
ConvertChannelExprsMIV(FilterFusionState current, boolean isInit)
          Create a new conversion object that will try to convert the communication expression in *current* to MIVs for the current stage (init if *isInit* == true).
 
Method Summary
 boolean tryMIV(JDoLoopStatement top)
          Try convert the communication expressions of the given FilterFusionState to buffer access with MIV index expression, starting at the top level do loop *top*.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertChannelExprsMIV

public ConvertChannelExprsMIV(FilterFusionState current,
                              boolean isInit)
Create a new conversion object that will try to convert the communication expression in *current* to MIVs for the current stage (init if *isInit* == true). Don't forget to call tryMIV();

Method Detail

tryMIV

public boolean tryMIV(JDoLoopStatement top)
Try convert the communication expressions of the given FilterFusionState to buffer access with MIV index expression, starting at the top level do loop *top*. Return true if the conversion was successful and false otherwise, if false, nothing was accomplished and one must use another conversion scheme.