Part Number: CODECOMPOSER
Other Parts Discussed in Thread: OMAP-L138
Hi,
I am working on a project with a lot of code. We are running on a OMAP-L138 chip. The DSP portion (c6748) of the code used to take ~45 minutes to compile.
In particular, there is one file which seems to take 20+ minutes. It is a very long file, with lots of functions and 37k lines.
I needed to move a lot of code into this file; adding a few thousand lines. After adding it, this file now takes 2+ hours to compile.
The new code I added has the following general characteristics:
- Only a few functions added, but some are very long (1000+ lines)
- Lots of conditional checks / case statements operating on float and int operators
- The functions use lots class member pointers which of pointers to heap memory
- There are long Switch statements, with several hundred cases
- There are very few loops in the added code; it is mostly just simple logic and calls to external functions
Since there are hardly any for loops and the code is very simple / procedural in nature, I did not expect the compile time to be affected much. Can anyone explain why the compile time could have changed so dramatically? What factors can improve the compile time? Could the function just need to be split up into smaller functions; or is it the fact that I am using pointers to heap memory be making the compiler's optimization go in circles?