> gcc -Os option was changed from producing smaller code without much
> performance hit to something that mainly aims at smaller code
That actually had always been the aim, but the tuning was not so good. For example, Mozilla was making some simple functions non-static that should have been static. These functions were very simple, but they were used only once and they still had to be included in the final binary. So GCC started being worried about including two copies of them and stopped inlining them. (This was fixed by tuning inliner heuristics to detect the optimization opportunities coming from the inlining of such simple functions).