This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38074] [4.4 Regression] missed inlining on Core2 Duo due to apparent wrong branch prediction/profile
- From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2008 17:08:11 -0000
- Subject: [Bug middle-end/38074] [4.4 Regression] missed inlining on Core2 Duo due to apparent wrong branch prediction/profile
- References: <bug-38074-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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