|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.dms.kjc.KjcEmptyVisitor
at.dms.kjc.SLIREmptyVisitor
at.dms.kjc.common.ToCCommon
at.dms.kjc.common.ToC
at.dms.kjc.spacetime.TraceIRtoC
public class TraceIRtoC
This class returns the c code (a string) for a given raw tile
| Field Summary | |
|---|---|
static String |
DUMMY_VOLATILE
a var name used to receive data from the dram on the compute proc over the gdn that is not needed but only generated because we have cache-line sized transfers from drams. |
static String |
DYNMSGHEADER
the name of the var that holds the dynamic message header |
| Fields inherited from class at.dms.kjc.common.ToC |
|---|
isInit, method |
| Fields inherited from class at.dms.kjc.common.ToCCommon |
|---|
alternatePrintsForTiming, hasBoolType, lastLeft, p, printPostfixMap, printPrefixMap |
| 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 |
| Constructor Summary | |
|---|---|
TraceIRtoC()
|
|
TraceIRtoC(ComputeNode tile)
|
|
| Method Summary | |
|---|---|
void |
createCCode()
The entry point to create C code for a RawTile |
static String |
getNetRegsDecls()
|
void |
pushClass(CType tapeType,
JExpression val)
|
void |
visitAssignmentExpression(JAssignmentExpression self,
JExpression left,
JExpression right)
prints an assignment expression |
void |
visitForStatement(JForStatement self,
JStatement init,
JExpression cond,
JStatement incr,
JStatement body)
prints a for statement |
void |
visitInlineAssembly(InlineAssembly self,
String[] asm,
String[] input,
String[] clobber)
prints InlineAssembly code |
void |
visitMethodCallExpression(JMethodCallExpression self,
JExpression prefix,
String ident,
JExpression[] args)
prints a method call expression |
void |
visitMethodDeclaration(JMethodDeclaration self,
int modifiers,
CType returnType,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JBlock body)
prints a method declaration |
void |
visitPeekExpression(SIRPeekExpression self,
CType tapeType,
JExpression num)
Visits a peek expression. |
void |
visitPopExpression(SIRPopExpression self,
CType tapeType)
Visits a pop expression. |
void |
visitPrintStatement(SIRPrintStatement self,
JExpression exp)
Process a Print statment, table driven to allow several backends Deals with the problem of string concatenation in Java not translating to our output languages C or C++ |
void |
visitPushExpression(SIRPushExpression self,
CType tapeType,
JExpression val)
Visits a push expression. |
void |
visitRegReceiverStatement(SIRRegReceiverStatement self,
JExpression portal,
SIRStream receiver,
JMethodDeclaration[] methods)
Visits a register-receiver statement. |
void |
visitRegSenderStatement(SIRRegSenderStatement self,
String fn,
SIRLatency latency)
Visits a register-sender statement. |
void |
visitVariableDefinition(JVariableDefinition self,
int modifiers,
CType type,
String ident,
JExpression expr)
prints a variable declaration statement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface at.dms.kjc.common.CodeGenerator |
|---|
getPrinter |
| Field Detail |
|---|
public static final String DYNMSGHEADER
public static final String DUMMY_VOLATILE
| Constructor Detail |
|---|
public TraceIRtoC(ComputeNode tile)
public TraceIRtoC()
| Method Detail |
|---|
public void createCCode()
public static String getNetRegsDecls()
public void visitForStatement(JForStatement self,
JStatement init,
JExpression cond,
JStatement incr,
JStatement body)
visitForStatement in interface KjcVisitorvisitForStatement in class ToCCommon
public void visitVariableDefinition(JVariableDefinition self,
int modifiers,
CType type,
String ident,
JExpression expr)
visitVariableDefinition in interface KjcVisitorvisitVariableDefinition in class KjcEmptyVisitor
public void visitMethodDeclaration(JMethodDeclaration self,
int modifiers,
CType returnType,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JBlock body)
visitMethodDeclaration in interface KjcVisitorvisitMethodDeclaration in class KjcEmptyVisitor
public void visitAssignmentExpression(JAssignmentExpression self,
JExpression left,
JExpression right)
visitAssignmentExpression in interface KjcVisitorvisitAssignmentExpression in class KjcEmptyVisitor
public void visitMethodCallExpression(JMethodCallExpression self,
JExpression prefix,
String ident,
JExpression[] args)
visitMethodCallExpression in interface KjcVisitorvisitMethodCallExpression in class KjcEmptyVisitor
public void visitPeekExpression(SIRPeekExpression self,
CType tapeType,
JExpression num)
SLIREmptyVisitor
visitPeekExpression in interface SLIRVisitorvisitPeekExpression in class SLIREmptyVisitor
public void visitPopExpression(SIRPopExpression self,
CType tapeType)
SLIREmptyVisitor
visitPopExpression in interface SLIRVisitorvisitPopExpression in class SLIREmptyVisitor
public void visitPrintStatement(SIRPrintStatement self,
JExpression exp)
ToCCommon
visitPrintStatement in interface SLIRVisitorvisitPrintStatement in class ToCCommon
public void pushClass(CType tapeType,
JExpression val)
public void visitPushExpression(SIRPushExpression self,
CType tapeType,
JExpression val)
SLIREmptyVisitor
visitPushExpression in interface SLIRVisitorvisitPushExpression in class SLIREmptyVisitor
public void visitRegReceiverStatement(SIRRegReceiverStatement self,
JExpression portal,
SIRStream receiver,
JMethodDeclaration[] methods)
SLIREmptyVisitor
visitRegReceiverStatement in interface SLIRVisitorvisitRegReceiverStatement in class SLIREmptyVisitor
public void visitRegSenderStatement(SIRRegSenderStatement self,
String fn,
SIRLatency latency)
SLIREmptyVisitor
visitRegSenderStatement in interface SLIRVisitorvisitRegSenderStatement in class SLIREmptyVisitor
public void visitInlineAssembly(InlineAssembly self,
String[] asm,
String[] input,
String[] clobber)
visitInlineAssembly in class SLIREmptyVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||