Optimization goal for LTO does not match compiler

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-13751
    • Hide
      ARMCLANG_2.1.0.LTS
      ARMCLANG_4.0.2.LTS
      ARMCLANG_4.0.0.LTS
      ARMCLANG_2.1.2.LTS
      ARMCLANG_1.3.1.LTS
      ARMCLANG_3.2.1.LTS
      ARMCLANG_5.0.0.LTS*
      ARMCLANG_3.2.3.LTS
      ARMCLANG_4.0.1.LTS
      ARMCLANG_3.2.0.LTS
      ARMCLANG_1.3.0.LTS
      ARMCLANG_2.1.3.LTS
      ARMCLANG_3.2.2.LTS
      Show
      ARMCLANG_2.1.0.LTS ARMCLANG_4.0.2.LTS ARMCLANG_4.0.0.LTS ARMCLANG_2.1.2.LTS ARMCLANG_1.3.1.LTS ARMCLANG_3.2.1.LTS ARMCLANG_5.0.0.LTS* ARMCLANG_3.2.3.LTS ARMCLANG_4.0.1.LTS ARMCLANG_3.2.0.LTS ARMCLANG_1.3.0.LTS ARMCLANG_2.1.3.LTS ARMCLANG_3.2.2.LTS
    • ARMCLANG_5.0.0.LTS*
    • default
    • Hide
      - Use only a single optimization option on the command line
      - Follow the precedence rules described
      Show
      - Use only a single optimization option on the command line - Follow the precedence rules described

      When the compiler is invoked with multiple optimization flags on the command line, the goal of linktime optimization may not agree with the goal of the first optimization.

      Expectation

      When multiple optimization options are passed to the compiler, the last one seen takes precedence for both the initial compilation as well as LTO

      Observation
      -O1, -O2, -O3, -Os, -Oz, and -Og always take precedence over any other optimization options
      -O0 takes precedence over -Ofast
      Example

      tiarmclang -O3 -O0 -flto project.c -Wl,lnk.cmd

      Correctly compiles project.c with no optimization (-O0)
      Incorrectly recompiles project.c as part of link-time optimization with speed-focused optimization (-O3)

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

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5401 - Optimization goal for LTO does not ...
                SYNCHRONIZED
                • Last Sync Date: