------- Comment #59 from hubicka at gcc dot gnu dot org 2010-03-25 17:37 ------- Hi, concerning the optimize_*_for_size and maybe_hot_*_p predicates, the idea is that maybe_hot/probably_cold care about the profile alone. So when optimizing for size, parts of program still can be considered hot and this can be used by optimizers if doing so does not increase code size (i.e. one can trade copy in hot block for copy in cold block even at -Os).
optimize_*_for_size should be aware of the defaults - with -Os everything is by default optimized for size unless user asks otherwise and with ohter levels only probably cold sutuff (that is negation of maybe_hot) is optimized for size. Let me check if there are some problems, but I guess this is just problem with too many nested loops leading to too large frequency differences. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40106