Investigative Feedback
A-11
FeedbackSolutions
Two Loops are Generated, One Not Software Pipelined
Description
If the trip count is too low, it is illegal to execute the software pipelined version
of the loop. In this case, the compiler could not guarantee that the minimum
trip count would be high enough to always safely execute the pipelined ver-
sion. Hence, it generated a non-pipelined version as well. Code is generated,
so that at run-time, the appropriate version of the loop will be executed.
Solution
Check the software pipeline loop information to see what the compiler knows
about the trip count. If you have more precise information, provide it to the com-
piler using one of the following methods:
-
Use the MUST_ITERATE pragma to specify loop count information in c
code.
-
Use the .trip directive to specify loop count information in linear assembly.
Alternatively, the compiler may be able to determine this information on its own
when you compile the function and callers with –pm and –op2.
For More Information...
See section 3.4.3.3,
Communicating Trip Count Information to the Compiler,
on page 3-43.
See section 6.2.5,
The .trip Directive, on page 6-8.
Uneven Resources
Description
If the number of resources to do a particular operation is odd, unrolling the loop
is sometimes beneficial. If a loop requires 3 multiplies, then a minimum itera-
tion interval of 2 cycles is required to execute this. If the loop was unrolled, 6
multiplies could be evenly partitioned across the A and B side, having a mini-
mum ii of 3 cycles, giving improved performance.
Solution
Unroll the loop to make an even number of resources.
For More Information...
See section 6.9,
Loop Unrolling (in Assembly), on page 6-94.
See section 3.4.3.4,
Loop Unrolling (in C), on page 3-44.