Thank you for recommending "".
Your recommendation has been successfully processed.
Debugging Optimized Code
Date Posted: July 28, 2011 01:57 PM
Debugging Optimized Code
Build Models
Lost In Translation
Scheduling Optimizations
Loop Unrolling Optimizations
Common Sub-expression Elimination
The Light at the End of the Tunnel
Appendix A
Additional Optimization Options
Appendix B -- [Next]
Appendix B
This appendix provides benchmark results for Green Hills MULTI Compiler optimization strategies. A number of standard benchmarks were included, such as EEMBC, CoreMark, and Dhrystone, along with proprietary ones. All benchmarks were run on a PowerPC 440 based core and an ARM Cortex-A8 based core using Green Hills MULTI Compiler v5.2. Smaller percentage numbers are better.
Size Comparison
| Optimization Setting |
PowerPC Size vs. No Optimization Size |
ARM Size vs. No Optimization Size |
| -Omoredebug |
84.98% |
78.64% |
| -Odebug |
82.12% |
73.99% |
| -Ogeneral |
72.46% |
61.41% |
| -Ospeed |
86.19% |
71.85% |
| -Osize |
58.47% |
53.41% |
The results get better along the main debug vs. optimization axis, at which point they fork. -Ogeneral sits in the middle of the size vs. speed axis;-Ospeed takes a step back (as expected), but -Osize produces the best results.
Speed Comparison
| Optimization Setting |
PowerPC Exec. Time vs. No Optimizations |
ARM Exec. Time vs. No Optimizations |
| -Omoredebug |
90.13% |
84.31% |
| -Odebug |
86.62% |
76.97% |
| -Ogeneral |
65.88% |
64.43% |
| -Ospeed |
57.77% |
56.60% |
| -Osize |
72.63% |
67.43% |
The results get better as we slide down the debug vs. optimization axis until we get to -Ogeneral. At that point, we can get even more impressive speed results with -Ospeed. However, on the opposite spectrum of the size vs. speed axis, -Osize takes a step back by about almost 7% on PowerPC and 3% on ARM, which is expected.
References
- "Using the GNU Compiler Collection: For GCC version 4.6.1" - manual for GCC, the GNU Compiler Collection
- "MULTI: Building Applications for Embedded PowerPC" - product documentation for Green Hills Software MULTI
- Green Hills Software
Index
Debugging Optimized Code
Build Models
Lost In Translation
Scheduling Optimizations
Loop Unrolling Optimizations
Common Sub-expression Elimination
The Light at the End of the Tunnel
Appendix A
Additional Optimization Options
Appendix B
C | C++ | Compiler | Debugging | gcc | GNU | Green Hills Software | Linker | optimization