On 01/08/15 10:47, Jakub Jelinek wrote:
Hi!

This patch is a small step towards fixing that PR that I had sitting on my
disk for quite a while, but didn't get to further steps so far.
I'll try to at least get to the multibyte memcpy/memmove expanded as
load followed by store, if the '\0' is known not to appear at all, or
known to appear on the last byte, or on the first byte during stage4,
but this part is self-contained enough that it should go in independently.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2015-01-08  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/63989
        * params.def (PARAM_MAX_TRACKED_STRLENS): Increment default
        from 1000 to 10000.
        * tree-ssa-strlen.c (get_strinfo): Moved earlier.
        (get_stridx): If we don't have a record for certain SSA_NAME,
        but it is POINTER_PLUS_EXPR of some SSA_NAME we do with
        constant offset, call get_stridx_plus_constant.
        (get_stridx_plus_constant): New function.
        (zero_length_string): Don't use get_stridx here.

        * gcc.dg/strlenopt-27.c: New test.
I'll assume that cranking up MAX_TRACKED_STRLENS isn't a significant compile-time hit.

OK for the trunk.

jeff


Reply via email to