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.
In CCS, the optimization settings are found in Project > Properties > Build > MSP430 Compiler >Optimization. There are two main optimization settings: Optimization level, and Speed vs size trade-offs
The optimization level determines what types of optimizations the compiler is allowed to make. Speed vs size setting tells the compiler if trade-offs should be made more in the favor of size or speed, with 0 being optimizing with the most focus on size, and level 5 being the most focus on speed. Settings between 0 and 5 instruct the compiler to take a more balanced approach.