Compiler fails to optimize out short lived variables, which causes loop to run slower

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: Low

      The attached source file contains an implementation of convolution of integer values. It has one loop that makes 4 calls to an inlined function. Build it with version 7.4.24 ...

      % cl6x -@options.txt file.c
      

      Inspect the resulting assembly code, and see the loop gets II=4. Build it again with 8.3.12, and the loop gets II=7.

      Somehow, version 7.4.24 optimizes out some short-lived variables in the inlined function. They do not appear in the optimizer generated comments. But 8.3.12 has them. That generates more MV and ADD instructions in the loop, driving up the resource bound.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-3432 - Compiler fails to optimize out shor...
                SYNCHRONIZED
                • Last Sync Date: