I seem to be in need of some help/guidance in troubleshooting issues that I believe are related to the optimizer.
I have an existing code base (C++,C) that was developed under DSP/BIOS for the C6482 and C6748 processors. The C6000 Compiler version 7.4.4 was used. opt_level = 3 was used. We have a suite of unit tests that all pass.
Now, we are porting this same code base and unit tests to the AM5728. Using the C6000 Compiler 8.1.0 and Sys/Bios. I started with opt_level = off and all the unit tests pass as I would have expected.
However, I have now tried opt_level = 0 and greater and unit tests start to fail. If I then customize the opt_level for a specific file to off, I can get the tests to pass again. I have yet to find the exact combination of files needed to have opt_level = off to make all the unit tests pass again. What really concerns me is that not all code is covered by unit tests, so we could have functional failures due to the optimizer.
Is this a common scenario? What methodology is recommended when turning on the optimizer? File by file? It is possible our code might not even run without the optimizer turned on to some degree, since we are a realtime system, so this issue will become quite important soon when we start SW/HW integration.