if (ClusterBackend.debugPrint)
if (ClusterBackend.debugging)
    public void visitFilter(SIRFilter filter,                            SIRFilterIter iter) {             int _mult = calcMult(filter);        // only increase mult if not inside a split join        //if (sj_counter != 0) _mult = 1;         if (_mult == 1) return;        if (ClusterBackend.debugPrint)            System.out.print("IncMult visiting: "+filter.getName()+                             " mult: "+_mult);        //if (_mult == 1) {        //    System.out.println(" No change!");        //    return;        //}        JMethodDeclaration work = filter.getWork();        if (ClusterBackend.debugPrint)            System.out.print(" work: "+work.getName());        //        // adding a work2 method        //            JBlock block = new JBlock(null, new JStatement[0], null);        JVariableDefinition counter =             new JVariableDefinition(null,                                     0,                                     CStdType.Integer,                                    "____i",                                    null);            JExpression initExpr =            new JAssignmentExpression(null,                                      new JLocalVariableExpression(null,                                                                   counter),                                      new JIntLiteral(0));        JStatement init = new JExpressionStatement(null, initExpr, null);        JExpression incrExpr =             new JPostfixExpression(null,                                    Constants.OPE_POSTINC,                                    new JLocalVariableExpression(null,                                                                counter));        JStatement incr =             new JExpressionStatement(null, incrExpr, null);        JExpression cond =             new JRelationalExpression(null,                                      Constants.OPE_LT,                                      new JLocalVariableExpression(null,counter),                                      new JIntLiteral(_mult));    //        JMethodCallExpression callExpr = //            new JMethodCallExpression(null, //                                      new JThisExpression(null), //                                      work.getName()+"__2", //                                      new JExpression[0]);        //JStatement call = new JExpressionStatement(null, callExpr, null);        //JBlock do_block = new JBlock(null, new JStatement[0], null);        //do_block.addStatement(call);        //do_block.addStatement(incr);            block.addStatement(                           new JVariableDeclarationStatement(null, counter, null));        block.addStatement(init);        JBlock for_block = new JBlock(null, new JStatement[0], null);        //for_block.addStatement(call);        for_block.addAllStatements(work.getBody());        JForStatement for_stmt = new JForStatement(null, init, cond, incr,                for_block,                 new JavaStyleComment[] {                new JavaStyleComment("IncreaseFilterMult", true,                        false, false)        });        // allow unrolling only if multiplicity increase         // is small or the filter has small code size        int code_size = CodeEstimate.estimateCode(filter)*_mult;        if ((_mult <= 8 && code_size < CODE_CACHE_SIZE / 2)) {            for_stmt.setUnrolled(false); // allow unrolling        } else {            for_stmt.setUnrolled(true); // disable unrolling        }         block.addStatement(for_stmt);        //block.addStatement(        //     new JDoStatement(null, cond, do_block, null));        //JBlock body = new JBlock(null, new JStatement[0], null);        //body.addStatement(new JExpressionStatement(null, new JMethodCallExpression(null, work.getName(), new JExpression[0]), null));        /*          JBlock work_body = work.getBody();              JMethodDeclaration old_work =           new JMethodDeclaration(null,           at.dms.kjc.Constants.ACC_PUBLIC,          CStdType.Void,          work.getName()+"__2",          JFormalParameter.EMPTY,          CClassType.EMPTY,          work_body,          null,          null);          filter.addMethod(old_work);         */        JMethodDeclaration new_work =             new JMethodDeclaration(null,                                    at.dms.kjc.Constants.ACC_PUBLIC,                                   CStdType.Void,                                   work.getName(),                                   JFormalParameter.EMPTY,                                   CClassType.EMPTY,                                   block,                                   null,                                   null);        // store the original work function        WorkInfo w = new WorkInfo();        w.work = filter.getWork();        w.pop = filter.getPopInt();        w.push = filter.getPushInt();        w.peek = filter.getPeekInt();        w.multiple = _mult;        previous_work.put(filter, w);        filter.setWork(new_work);         //        // increasing peek, pop, push rates        //            int pop = filter.getPopInt();        int push = filter.getPushInt();        int peek = filter.getPeekInt();        int extra = 0;        if (peek > pop) extra = peek - pop;        filter.setPop(pop * _mult);        filter.setPush(push * _mult);        filter.setPeek(pop * _mult + extra);        if (ClusterBackend.debugPrint)            System.out.println(" new work: "+filter.getWork().getName());    }