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.

Compiler/TMS320F28335: Compiler version higher than 6.1.6 results in slower code

Part Number: TMS320F28335
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: TI C/C++ Compiler

Hello,

Currently we are using TMS320F28335, CCS 5.2, compiler version 6.1.6 without optimization.  It is working well.

I would like to move to CCS9.1.0 and the latest compiler (18.12.4  LTS).  When I tried changing the compiler, I ran out of time, meaning that the code takes longer to execute, even with optimization.

While in CCS5.2, I noticed that if I changed the compiler to version 6.4.3 I already run out of time.

What are my options?  Can I use compiler 6.1.6 in CCS9.1?   Why do newer compilers generate slower code?

Thank you.

  • Please be sure the code and data are executing from the same kinds of memory, i.e. internal vs external and/or flash vs RAM.  That can make a big difference.  If that doesn't explain it ...

    Please identify one source file which contains functions that run slower with version 18.12.4.LTS.  For that source file, please follow the directions in the article How to Submit a Compiler Test Case.  With one change.  Show all the build options as used with version 6.1.6 and version 18.12.4.LTS.

    Stefani said:
    Can I use compiler 6.1.6 in CCS9.1?

    You can.  That said, please understand that version 6.1.6 was released about 6 years ago. It was never tested with CCS 9.1.  The likelihood of a big issue is very low.  But you might encounter some smaller issues.

    Thanks and regards,

    -George

  • Thank you for replying, George.

    I will compare them.

    When I try to use compiler version 6.1.6 in CCS9.1,  I got the following:

    !CONFIGURATION: 'com.ti.ccstudio.buildDefinitions.C2000.Debug.397431213' [Fri Dec 06 15:12:46 CST 2019]

    !TOOL: 'com.ti.ccstudio.buildDefinitions.C2000_6.1.exe.compilerDebug.60377545'

    !WARNING: Unresolved option: com.ti.ccstudio.buildDefinitions.C2000_6.1.compilerID.FP_MODE

    !WARNING: Unresolved option: com.ti.ccstudio.buildDefinitions.C2000_6.1.compilerID.ADVICE__PERFORMANCE

    !WARNING: Unresolved option: com.ti.ccstudio.buildDefinitions.C2000_6.1.compilerID.ABI

    I take it in CCS9 those options are no longer available?

  • Those warnings appear to be caused by compiler options which CCS expects to see but compiler version 6.1.6 does not provide.  You can ignore those warnings.

    Thanks and regards,

    -George

  • George,

    I sent the file to you in a private message.  It seems that math heavy calculations using floating point numbers somehow take longer to execute in later compiler versions.

    Thank you,

  • Thank you for the test case.  

    Unfortunately, no obvious problems stick out.  And the file is larger than I hoped.  I'd appreciate if you could name one or two functions where I should focus my effort.

    Thanks and regards,

    -George

  • George,

    Thank you for looking into this.  

    To narrow it down, take a look at ComputeRMS function.  It increases about 50% execution time between compiler 6.1.6 and 18.12.0 (both with CCS5.2).

    To go from CCS5.2 compiler 6.1.6 to CCS9 compiler 18.12.0 LTS it almost doubled!

  • Thank you for the test case. Unfortunately, I am unable to work out the reason for the performance difference.  I filed the entry CODEGEN-7018 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • Thanks George.

    For now I will stay with CCS 5.2 and compiler 6.1.6 then.

  • All of our analysis up to this point has been static.  That is, we didn't run the code.  But, now we added a test harness around ComputeRms and ran it.  Still, we are unable to reproduce the problem.  In fact, we see it run a bit faster when built with compiler version 18.12.4.LTS.

    This once again makes me think some other factor causes the difference.  Maybe different kinds of memory are being used?  If that isn't it, then I recommend you start a new thread in the C2000 device forum.  Or, if you prefer, I can move this thread into that forum.

    Thanks and regards,

    -George