Missed ssa-copyrename optimization?
Richard Biener
richard.guenther@gmail.com
Tue Jan 8 10:42:00 GMT 2013
On Tue, Jan 8, 2013 at 8:51 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> Hi,
> For attached preprocessed file, dump file
> lib_a-s_frexp.E.021t.copyrename1 contains gimple sequences like:
>
> <bb 4>:
> x_41 = x_8(D);
> goto <bb 8>;
>
> <bb 5>:
> if (ix_15 <= 1048575)
> goto <bb 6>;
> else
> goto <bb 7>;
>
> <bb 6>:
> x_19 = x_8(D) * 1.8014398509481984e+16;
> gh_u.value = x_19;
> _21 = gh_u.parts.msw;
> hx_22 = (__int32_t) _21;
> gh_u ={v} {CLOBBER};
> ix_24 = hx_22 & 2147483647;
> *eptr_16(D) = -54;
>
> <bb 7>:
> # x_1 = PHI <x_8(D)(5), x_19(6)>
> # hx_2 = PHI <hx_11(5), hx_22(6)>
> # ix_3 = PHI <ix_15(5), ix_24(6)>
> _26 = *eptr_16(D);
> _27 = ix_3 >> 20;
> _28 = _27 + -1022;
> _29 = _26 + _28;
> *eptr_16(D) = _29;
> hx.0_31 = (unsigned int) hx_2;
> _32 = hx.0_31 & 2148532223;
> _33 = _32 | 1071644672;
> hx_34 = (__int32_t) _33;
> sh_u.value = x_1;
> hx.1_36 = (unsigned int) hx_34;
> sh_u.parts.msw = hx.1_36;
> x_38 = sh_u.value;
> sh_u ={v} {CLOBBER};
> x_40 = x_38;
>
> <bb 8>:
> # _4 = PHI <x_41(4), x_40(7)>
> return _4;
>
> I am not sure if phi node (_4, x_41, x_40) in basic block 8 should be
> rename/partitioned into one partition.
> Trunk does not do this rename/partition, which causing big regression
> in code size on Thumb1.
>
> BTW, the command line is:
> arm-none-eabi-gcc -mthumb -mcpu=cortex-m0 -Os/-O2 ...
>
> I noticed the behavior is intended by PR54200, but not sure how the
> issue should be handled. Any suggestions?
Missed coalescing should be handled by adjusting the out-of-SSA coalescing
code, not by copyrename (which really should go - it should not be needed
with VTA and var-tracking around).
Richard.
> --
> Best Regards.
More information about the Gcc
mailing list