Thumb2 code size improvements
ams at codesourcery.com
Tue Sep 7 09:31:26 BST 2010
On 06/09/10 07:16, Yao Qi wrote:
> I've put some ideas in this wiki page,
We probably shouldn't post Internal links to this public list. Is there
any reason this can't be done in the open?
Now for the page content ....
I think you should make clear that we're after _size_ optimizations in
this case, if just for readability's sake.
1. This example (regardless of correctness) gains no size improvement.
2. This code is clearly an inlined memset. It might be that a branch
instruction with constants and such is not (much) smaller. We should
investigate what GCC does for different size writes.
3. This sounds like a nightmare for register allocation, but if you
could make it happen then great :)
6. Is that an EEMBC function? We can't change those in the source. Are
you proposing a -fwhole-program optimization? (Of course, enabling
inlining at -Os for trivial functions like this might work without
-fwhole-program or LTO, if it's in the same TU.)
* Investigate reduced alignment constraints?
More information about the linaro-toolchain