------- Comment #5 from rth at gcc dot gnu dot org 2009-08-19 23:06 ------- Basic block reordering *should* be altered to work with -Os. It's definitely required to clean up silly jump sequences that exception handling creates.
There's no reason, in principal, that the ordering algorithm can't be adjusted to minimize the number of branches, or the total size of all of the branch instructions (though that could require some clever changes to the shorten_branches code). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41004