if (RawBackend.structures.length > 0)
SIRStructure[] structs = RawBackend.structures; if (RawWorkEstimator.SIMULATING_WORK) structs = RawWorkEstimator.structures;  if (structs.length > 0)
    public void visitFilter(SIRFilter self,                            SIRFilterIter iter) {        //       System.out.println(self.getName());                //Entry point of the visitor        //do not print the raw header if compiling        //for uniprocessor        if (!KjcOptions.standalone)             p.print("#include <raw.h>\n");        p.print("#include <stdlib.h>\n");        p.print("#include <math.h>\n\n");        p.print(RawSimulatorPrint.getHeader());                //if we are number gathering and this is the sink, generate the dummy        //vars for the assignment of the print expression.        if (KjcOptions.numbers > 0) {            p.print("volatile int dummyInt;\n");            p.print("volatile float dummyFloat;\n");        }                if (/*KjcOptions.altcodegen && */ !KjcOptions.decoupled){            p.print("register float " + RawUtil.CSTOFPVAR + " asm(\"$csto\");\n");            p.print("register float " + RawUtil.CSTIFPVAR + " asm(\"$csti\");\n");            p.print("register int " + RawUtil.CSTOINTVAR + " asm(\"$csto\");\n");            p.print("register int " + RawUtil.CSTIINTVAR + " asm(\"$csti\");\n");        }                if (KjcOptions.decoupled) {            p.print("volatile float " + RawUtil.CSTOFPVAR + ";\n");            p.print("volatile float " + RawUtil.CSTIFPVAR + ";\n");            p.print("volatile int " + RawUtil.CSTOINTVAR + ";\n");            p.print("volatile int " + RawUtil.CSTIINTVAR + ";\n");        }                if (RawBackend.FILTER_DEBUG_MODE) {            p.print("void static_send_print(");            if (self.getOutputType() == CStdType.Void)                p.print("int f) {\n");                        else                 p.print(self.getOutputType() + " f) {\n");            if (self.getOutputType().isFloatingPoint())                 p.print("print_float(f);\n");            else                 p.print("print_int(f);\n");            p.print("static_send(f);\n");            p.print("}\n\n");        }                //if there are structures in the code, include        //the structure definition header files        if (RawBackend.structures.length > 0)             p.print("#include \"structs.h\"\n");        //print the extern for the function to init the         //switch, do not do this if we are compiling for        //a uniprocessor        if (!KjcOptions.standalone) {            p.print("void raw_init();\n");            p.print("void " + SwitchCode.SW_SS_TRIPS + "();\n");        }        //Visit fields declared in the filter class        JFieldDeclaration[] fields = self.getFields();        for (int i = 0; i < fields.length; i++)            fields[i].accept(this);                //add function for --standalone that will get the iteration        //count from the command-line        if (KjcOptions.standalone)             addIterCountFunction();        //visit methods of filter, print the declaration first        setDeclOnly(true);        JMethodDeclaration[] methods = self.getMethods();        for (int i =0; i < methods.length; i++)            methods[i].accept(this);        //now print the functions with body        setDeclOnly(false);        for (int i =0; i < methods.length; i++) {            methods[i].accept(this);            }                //if we are generating raw code print the begin        //method for the simulator        if (!KjcOptions.standalone) {            p.print("void begin(void) {\n");        }        else {            //otherwise print a normal main()            p.print("int main(int argc, char** argv) {\n");        }              if (KjcOptions.standalone) {            p.print("  " + ARGHELPER_COUNTER + "(argc, argv);\n");        }                //if we are using the magic network,         //use a magic instruction to initialize the magic fifos        if (KjcOptions.magic_net)            p.print("  __asm__ volatile (\"magc $0, $0, 1\");\n");                //initialize the dummy network receive value        if (KjcOptions.decoupled) {            if (self.getInputType().isFloatingPoint())                 p.print("  " + RawUtil.CSTIFPVAR + " = 1.0;\n");            else                 p.print("  " + RawUtil.CSTIINTVAR + " = 1;\n");        }        //call the raw_init() function for the static network        //only if we are not using a uniprocessor or the        //magic network        if (!(KjcOptions.standalone || KjcOptions.magic_net || KjcOptions.decoupled ||              IMEMEstimation.TESTING_IMEM)) {            p.print("  raw_init();\n");            //the call to raw_init2 is now within __RAW_MAIN__()        }        //execute the raw main function        p.print(RawExecutionCode.rawMain + "();\n");        //return 0 if we are generating normal c code        if (KjcOptions.standalone)             p.print("  return 0;\n");        p.print("}\n");               createFile();    }