Next | Prev | Up | Top | Contents | Index

How to Diagnose What Went Wrong

When you don't get much improvement in your application's performance after compiling with software pipelining, you should ask the following questions and consider some possible answers:

  1. Did it software pipeline at all?

    Software pipelining works only on inner loops. What is more, inner loops with subroutine calls or complicated conditional branches do not software pipeline.

  2. How well did it pipeline?

    Look at statistics in the .s or .L file.

  3. What can go wrong in SWP code?

    Your generated code may not have the operations you expected.

  4. Think about how you would hand code it.

    What operations did it need?

    Look at the loop in the .s file.

    Is it very different? Why?

    Sometimes this is human error. (Improper code, or typo.)

    Sometimes this is a compiler error.

Perhaps the compiler didn't schedule tightly. This can happen because there are unhandled recurrence divides (Divides in general, are a problem) and because there are register allocation problems (running out of registers).


Next | Prev | Up | Top | Contents | Index