]> git.baikalelectronics.ru Git - kernel.git/commit
Give up on pushing CC_OPTIMIZE_FOR_SIZE
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 May 2011 21:30:36 +0000 (14:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 May 2011 21:30:36 +0000 (14:30 -0700)
commit8ae8e87b83df0a0be29d2301c6b8bdfc5a208669
tree2ecb019795e99147ce8d90b5e97c2bc3051f7855
parent603e5eb50430305a79cbd4c307b89e67c2b4befa
Give up on pushing CC_OPTIMIZE_FOR_SIZE

I still happen to believe that I$ miss costs are a major thing, but
sadly, -Os doesn't seem to be the solution.  With or without it, gcc
will miss some obvious code size improvements, and with it enabled gcc
will sometimes make choices that aren't good even with high I$ miss
ratios.

For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy
into a "rep movsl".  While I sincerely hope that x86 CPU's will some day
do a good job at that, they certainly don't do it yet, and the cost is
higher than a L1 I$ miss would be.

Some day I hope we can re-enable this.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/Kconfig