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.
Tool/software: TI C/C++ Compiler
Hello,
In order to save throughput, we've enabled Optimization Level 2 in our CCS settings, but the build is broken and not functional. We need to identify which optimization option causes the issue.
We need to clearly understand what each optimization option do, what is required in order to use it (does the code needs to be written in specific way?), what are the limitations. We develop safety critical Level A software that is going to be certified.
Chapter 3 of the TI ARM compiler manual (SPNU151R) contains very vague description of optimization levels:
--opt_level=0 or -O0
– Performs control-flow-graph simplification
– Allocates variables to registers
– Performs loop rotation
– Eliminates unused code
– Simplifies expressions and statements
– Expands calls to functions declared inline
• --opt_level=1 or -O1
Performs all --opt_level=0 (-O0) optimizations, plus:
– Performs local copy/constant propagation
– Removes unused assignments
– Eliminates local common expressions
• --opt_level=2 or -O2
Performs all --opt_level=1 (-O1) optimizations, plus:
– Performs loop optimizations
– Eliminates global common subexpressions
– Eliminates global unused assignments
– Performs loop unrolling
As in GNU compiler, I assume each of these optimization options could be enabled/disabled individually. Let say, O2 contains "Performs loop optimizations".What is compiler option that would allow us to select only "Performs loop optimizations", and not perform other optimizations that are part of O2?
Thank you for your answer,
Radek
This appears to be a duplicate of this other post: https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/906172/3350560
Closing this one.