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/OMAP-L138: ERROR - OUT OF MEMORY - OPTIMIZER ABORTED IN <object>

Part Number: OMAP-L138

Tool/software: TI C/C++ Compiler

OMAP-L138B-EP on custom hardware

Code Composer Studio v6.1.2

C6000 code generation tools v7.4.14

C++ application

Optimization level 2

PC:

Windows 10 Enterprise  v1809

Intel I7

32 GB

I am trying to integrate some code from a colleague. This codes move a tremendous amount of data around. The C++ method at the center of current controversy uses a switch statement with roughly 3000 case statements. (I acknowledge that perhaps we need to rethink that C++ method.)

When I try to build the application in CCSv6.1.2 with C6000 CGTv7.4.14, the optimizer terminates abnormally. 

We develop our software on an isolated network. Consequently, I must manually type what I see into this form.

I see messages something like this:

ERROR - OUT OF MEMORY - OPTIMIZER ABORTED IN

<module with large switch statement with a bunch of cases>

Optimizer terminated abnormally in function

<function with large switch statement>

in file

<file with large switch statement>.cpp

Compilation failure

gmake[1]: *** [<object>]  Error 1

gmake[1]: Target 'main-build' not remade because of errors.

gmake: *** [all] Error 2

There are a few things I will try shortly:

  • Reduce optimization level for the file with large switch statement
    • Optimization level 1
    • Optimization level 0
    • Optimization off
  • Try C6000 CGT v7.4.24  (Our application does not build with C6000 CGT v8.x. We have not needed to use C6000 CGT v8.x so far.)
  • Try CCSv8.3.0 (It is the newest version available on our isolated network)

Any other suggestions?

Thanks in advance for guidance.

PJ

  • I turned off optimization for the problem module and tried to build just that module.

    I see something like this now:

    <file>.cpp,   line x:

    INTERNAL ERROR: Number of virtual registers beyond limit. Reduce function size

    This may be a serious problem. Please contact customer support with a description of this problem and a sample of the source files that cause this INTERNAL ERROR message to appear.

    Cannot continue compliation - ABORTING

    >> Compilation failure

    gmake: *** [<object>] Error 1

    I will work on refactoring the problem method. I welcome other suggestions.

  • Patrick McCloskey said:

    There are a few things I will try shortly:

    • Reduce optimization level for the file with large switch statement
      • Optimization level 1
      • Optimization level 0
      • Optimization off
    • Try C6000 CGT v7.4.24  (Our application does not build with C6000 CGT v8.x. We have not needed to use C6000 CGT v8.x so far.)

    These are all good ideas.

    Patrick McCloskey said:
    Try CCSv8.3.0 (It is the newest version available on our isolated network)

    That should not make any difference.

    However, I suspect you will be forced to reduce the size of that very large function.

    Thanks and regards,

    -George