This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

--no_bad_aliases Not Always an Improvement?

Hi,

We're using 2 different DSPs, a C6455 and a C6747.

On the C6455 we have some pixel processing loops and selecting --no_bad_aliases makes a big difference to how fast these loops run (possibly better than 10x improvement). Obviously we need to follow the guidance in the manual about when --no_bad_aliases is applicable.

My colleague who's working with the C6747 selected --no_bad_aliases and the code got slower which worried me a bit. I was hoping that there would be an easy to follow rule about --no_bad_aliases such as 'always use it if you don't have bad aliases'.

The C6747 doesn't do any pixel processing but it does have plenty of loops (in most cases the maximum loop iterations will 10s rather than 1000s).

I was wondering if --no_bad_aliases can be counter productive for shorter loops (currently our code doesn't contain any MUST_ITERATE pragmas).

Or, can optimised loops be slower when the loop count is zero? I've got a feeling that my colleague may have run his test with a very small amount of data and it's possible that there wasn't anything for many of the loops to do.

Any thoughts about --no_bad_aliases greatly appreciated!

Thanks,

Matt

  • Well, that doesn't happen very often.  But it happens.  

    Compilers have to solve lots of different problems to generate good code.  It solves the hardest of those problems using heuristics.  See http://tiexpressdsp.com/index.php/Compiler_heuristic .  Most of the time, things work out for the better.  Sometimes, it makes no difference.  Occasionally, as you've seen, it can make things worse.  All compilers, for hosted and embedded systems, are subject to this problem.  Sorry!

    Thanks and regards,

    -George