workBody.addStatement(lastPos,popStatement);
workBody.addStatement(lastPos+1,popStatement);
    private static void forScheduling (SIRFilter f) {        int veclen = KjcOptions.vectorize / 4;                JMethodDeclaration workfn = f.getWork();        JBlock workBody = workfn.getBody();        // adjust rates.        int pushrate = f.getPushInt();        int poprate = f.getPopInt();        int peekrate = f.getPeekInt();        f.setPush(pushrate * veclen);        f.setPeek(peekrate + (veclen - 1) * poprate);        f.setPop(poprate * veclen);//      alternative to vectorization for testing:        if (KjcOptions.atlas) {            // use bogus switch to change multiplicity...            workfn.setBody(new JBlock(new JStatement[]{at.dms.util.Utils.makeForLoop(workBody, veclen)}));        } else {        // fix number of pops for new rate.        if (poprate > 0) {            List<JStatement> stmts = workBody.getStatements();            int lastPos = stmts.size() - 1;            JStatement last = stmts.get(lastPos);            while (last instanceof SIRMarker) {                lastPos--;                last = stmts.get(lastPos);            }            if (last instanceof JExpressionStatement                    && ((JExpressionStatement) last).getExpression() instanceof SIRPopExpression) {                // final statement fixes number of pops: mung number.                SIRPopExpression pop = (SIRPopExpression) ((JExpressionStatement) last)                        .getExpression();                pop.setNumPop(pop.getNumPop() + (veclen - 1) * poprate);            } else {                SIRPopExpression pop = new SIRPopExpression(f.getInputType(),                        (veclen - 1) * poprate);                JStatement popStatement = new JExpressionStatement(pop);                workBody.addStatement(lastPos,popStatement);            }        }        }    }