Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10288

Add option to disable global symbol clustering in optimizer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Implemented
    • Icon: High High
    • Code Generation Tools
    • CODEGEN-8740
    • ARM_20.2.4.LTS
    • ARM_20.2.5.LTS
    • default

      Here are a few lines from the map file for a system built with --opt_level=2 ...

      LINKER GENERATED COPY TABLES
      
      __TI_cinit_table @ 00011234 records: 2, size/record: 8, table size: 16
      	.data: load addr=00011248, load size=000002f0 bytes, run addr=20003fa8, run size=000002e8 bytes, compression=copy
      	.bss: load addr=00011538, load size=00000008 bytes, run addr=20004290, run size=00000170 bytes, compression=zero_init
      

      Here are the same lines from the map file for the same system built the same way, except with --opt_level=4 ...

      LINKER GENERATED COPY TABLES
      
      __TI_cinit_table @ 00010744 records: 2, size/record: 8, table size: 16
      	.data: load addr=00010758, load size=0000038c bytes, run addr=20003fa8, run size=00000384 bytes, compression=copy
      	.bss: load addr=00010ae8, load size=00000008 bytes, run addr=20004330, run size=000000d0 bytes, compression=zero_init
      

      Compare the load size numbers. Notice how --opt_level=4 requires more memory. This is because some variables change how they are initialized. Under --opt_level=2, these variables are in .bss and are filled with 0 by the compression=zero_init method. This is a method which takes very little memory to implement. Under --opt_level=4, some of these variables change from being in .bss to .data. These variables are no longer initialized by zero fill, but by being explicitly initialized to 0 with entries in .cinit. Such entries take more memory.

      The test case which demonstrates the problem, and how to build it, requires a long description. For brevity, it is not included here, but in other parts of this record which are not publicly exposed.

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

              Created:
              Updated:
              Resolved: