NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Updates to Hand-Tuning Loops on C6000 Application Note
Introduction[edit]
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[edit]
Some readers have taken from this section that is always good to transform conditional expressions like:
<syntaxhighlight lang=c> if (cond1 && cond2) // note && {
...
} </syntaxhighlight>
to:
<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.