Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Updates to Hand-Tuning Loops on C6000 Application Note

From Texas Instruments Wiki
Jump to: navigation, search


This page contains updates to the application note tidoc:spra666 Hand-Tuning Loops and Control Code on the TMS320C6000. Updates may arise as the compiler changes release to release, or new techniques are discovered. All such changes are collected in this article. Eventually, a revision of the application note may be issued.

Update to Section 5.2.7 Optimizing Conditional Expressions

Some readers have taken from this section that is always good to transform conditional expressions like:

<syntaxhighlight lang=c> if (cond1 && cond2) // note && {


} </syntaxhighlight>


<syntaxhighlight lang=c> if (cond1 & cond2) // note & {


} </syntaxhighlight>

This is not the case. One reason this is not the case is that the compiler may perform this transformation for you. The likelihood of the compiler performing this transformation automatically has gone up in recent releases. However, that does not mean you will never need to apply this technique manually. It is possible that, in an important inner loop, manually changing "&&" to "&" (or "||" to "|") could cause a loop to perform much better.

All that said, do not perform this change indiscriminately. Wait until you find a loop that is performing poorly and contains "&&". Then manually change to "&" to see if it helps.