|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.sir.EmptyStreamVisitor
at.dms.kjc.sir.linear.LinearReplacer
at.dms.kjc.sir.linear.LinearRedundancyReplacer
public class LinearRedundancyReplacer
Generates replacement filter code using the information within a
LinearRedundancyAnalyzer to generate filters with less computational
requirements. Refer to the documentation in LinearRedundancy
for more information.
$Id: LinearRedundancyReplacer.java,v 1.17 2006/09/25 13:54:42 dimock Exp $
Field Summary | |
---|---|
static String |
INDEX_POSTFIX
The postfix to use for the index variable. |
static int |
INITWORK
The constant to signify that we are making the init work function (and not work). |
static String |
STATE_FIELD_PREFIX
The prefix to use to name fields. |
static int |
WORK
The constant to signify that we are making a work function (and not init work). |
Fields inherited from interface at.dms.kjc.Constants |
---|
CMP_VERSION, JAV_CLASS, JAV_CLONE, JAV_CLONEABLE, JAV_CONSTRUCTOR, JAV_ERROR, JAV_EXCEPTION, JAV_INIT, JAV_LENGTH, JAV_NAME_SEPARATOR, JAV_OBJECT, JAV_OUTER_THIS, JAV_RUNTIME, JAV_RUNTIME_EXCEPTION, JAV_STATIC_INIT, JAV_STRING, JAV_STRINGBUFFER, JAV_THIS, JAV_THROWABLE, OPE_BAND, OPE_BNOT, OPE_BOR, OPE_BSR, OPE_BXOR, OPE_EQ, OPE_GE, OPE_GT, OPE_LE, OPE_LNOT, OPE_LT, OPE_MINUS, OPE_NE, OPE_PERCENT, OPE_PLUS, OPE_POSTDEC, OPE_POSTINC, OPE_PREDEC, OPE_PREINC, OPE_SIMPLE, OPE_SL, OPE_SLASH, OPE_SR, OPE_STAR, TID_ARRAY, TID_BIT, TID_BOOLEAN, TID_BYTE, TID_CHAR, TID_CLASS, TID_DOUBLE, TID_FLOAT, TID_INT, TID_LONG, TID_SHORT, TID_VECTOR, TID_VOID, VECTOR_EMPTY |
Method Summary | |
---|---|
static void |
doReplace(LinearAnalyzer lfa,
LinearRedundancyAnalyzer lra,
SIRStream str)
start the process of replacement on str using the Linearity information in lfa. |
JFieldDeclaration[] |
makeFields(at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
Makes the state and index fields for each of the tuple. |
void |
makeIndexUpdateStatement(JBlock body,
LinearComputationTuple t,
at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
Creates an index increment of the form: |
boolean |
makeReplacement(SIRStream self)
Visit a pipeline, splitjoin or filter, replacing them with a new filter that directly implements the linear representation. |
JExpression |
makeTupleAccess(LinearComputationTuple t,
at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
Creats a tuple access to a tuple state field for the specified tuple. |
JExpression |
makeTupleComputation(LinearComputationTuple tuple)
Generate a JExpression that computes the value specified by a computation tuple. |
JMethodDeclaration |
makeWork(int type,
LinearFilterRepresentation linearRep,
at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
Make either the work or the init work function. |
Methods inherited from class at.dms.kjc.sir.EmptyStreamVisitor |
---|
postVisitFeedbackLoop, postVisitPipeline, postVisitSplitJoin, postVisitStream, preVisitStream, visitPhasedFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STATE_FIELD_PREFIX
public static final String INDEX_POSTFIX
public static final int WORK
public static final int INITWORK
Method Detail |
---|
public static void doReplace(LinearAnalyzer lfa, LinearRedundancyAnalyzer lra, SIRStream str)
public boolean makeReplacement(SIRStream self)
makeReplacement
in class LinearReplacer
public JFieldDeclaration[] makeFields(at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
public JMethodDeclaration makeWork(int type, LinearFilterRepresentation linearRep, at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
public JExpression makeTupleComputation(LinearComputationTuple tuple)
public JExpression makeTupleAccess(LinearComputationTuple t, at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
public void makeIndexUpdateStatement(JBlock body, LinearComputationTuple t, at.dms.kjc.sir.linear.LinearRedundancyReplacer.RedundancyReplacerData tupleData)
tuple_index = tuple_index - 1; if (tuple_index < 0) { tuple_inded = maxUse(tuple); }
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |