Compiler generated code loads a member of a structure more than strictly necessary

XMLWordPrintable

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

      The attached test case contains code similar to:

          int8_t local = global_ptr->array[i].member1;
          if (local != global_ptr->member2)
          {
              /* several lines later */
      	function_call(local);
          }
      

      The code generated by the compiler loads member1 two times, into different registers. Subsequent code that refers to local (a copy of member1), uses both registers at different times.

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

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-4879 - Compiler generated code loads a mem...
                SYNCHRONIZED
                • Last Sync Date: