Optimizing Code for Small Size

Many people know the -Os flag of gcc to reduce the code size. Now a while ago Benno posted some tipps to reduce the size of a compiled program for ARM, which give a good hint what to look for in any case. His Summary
"Compile to Thumb instructions.
Use -Os to optimise for space.
Look for unnecessary code.
Look for examples of registers used in the wrong place."

No comments:

Post a Comment

I appreciate comments. Feel free to write anything you wish. Selected comments and questions will be published.