[Bug fortran/48636] Enable more inlining with -O2 and higher
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 21 08:15:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48636
--- Comment #18 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-08-21 08:14:33 UTC ---
With loop_iterations hint, we should now hint the bar function of testcase in
comment #4, but we don't because the value is used conditionally:
# iftmp.11_3 = PHI <_12(3), 1(2)>
a.0_16 = a_11(D)->data;
_17 = a_11(D)->dim[0].ubound;
_18 = a_11(D)->dim[0].lbound;
_19 = _17 - _18;
ubound.0_20 = _19 + 1;
stride.3_21 = a_11(D)->dim[1].stride;
_22 = a_11(D)->dim[1].ubound;
_23 = a_11(D)->dim[1].lbound;
_24 = _22 - _23;
ubound.2_25 = _24 + 1;
_27 = -iftmp.11_3;
offset.4_28 = _27 - stride.3_21;
*x_35(D) = 0.0;
_53 = stride.3_21 >= 0;
_56 = ubound.2_25 > 0;
_57 = _53 & _56;
_59 = stride.3_21 < 0;
_60 = _57 | _59;
_66 = _59 | _60;
if (_66 != 0)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
iftmp.13_68 = (integer(kind=4)) ubound.2_25;
<bb 6>:
# iftmp.13_4 = PHI <iftmp.13_68(5), 0(4)>
if (iftmp.13_4 > 0)
goto <bb 7>;
else
goto <bb 14>;
Martin, does this work with your PHI patch? (i.e. do you get "loop iterations"
in -fdump-ipa-inline?)
Next step will be to teach inliner to inline into functions called once when
callee is important and some propagation happens.
Honza
More information about the Gcc-bugs
mailing list