------- Comment #10 from hubicka at gcc dot gnu dot org 2008-12-05 17:08 ------- compute_call_stmt_bb_frequency test is indeed bit insane, but probably works in practice. I will fix this on pretty-ipa branch. Looking at sw(__MAIN) just after profiling, profile is there and it is sort of sane.
The reason for low probability of the internal loop being somewhat cold is block 31 that is predicted via noreturn heuristics. It looks like the code is leading to exit at error cases and to noreturn call in common case that is confusing the predictors... Block 31 starts with: omega_178 = 6.28318530700000010824624041561037302017211914062e+0 / period.151_177 v0 ={v} 1.0000000000000000555111512312 5782702118158340454e-1 dt_parm.51.common.filename ={v} &"channel.f90"[1]{lb: 1 sz: 1}; Perhaps if all paths through function leads to noreturn, one can disable the heuristics... I will check if this works. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38074