I still happen to believe that I$ miss costs are a major thing, butsadly, -Os doesn't seem to be the solution. With or without it, gccwill miss some obvious code size improvements, and with it enabled gccwill sometimes make choices that aren't good even with high I$ missratios.
For example, with -Os, gcc on x86 will turn a 20-byte constant memcpyinto a "rep movsl". While I sincerely hope that x86 CPU's will some daydo a good job at that, they certainly don't do it yet, and the cost ishigher than a L1 I$ miss would be.
Some day I hope we can re-enable this.Signed-off-by: Linus Torvalds
Reference: Linux Kernel GIT