[RFA] Handle _CHK builtins in tree-ssa-dse.c

Richard Biener richard.guenther@gmail.com
Wed Jun 26 11:28:00 GMT 2019


On Tue, Jun 25, 2019 at 2:20 AM Jeff Law <law@redhat.com> wrote:
>
> These are some minor improvements to tree-ssa-dse, in particular it adds
> handling of the _CHK variants of the supported functions (memcpy,
> memmove, memset).  It's just something I noticed while poking at 90883.
>
> These don't trigger during bootstraps, but do in the testsuite.   The
> tests that were changed were verified to make sure that the
> removal/trimming of *_CHK calls were correct.  For example, some tests
> in the c-torture/builtins directory do things like
>
>   __builtin_memset_chk (...);
>   abort ();
>
> Since the memory locations are never read, DSE just removes the call.
> This happened with enough regularity in the c-torture/execute/builtins
> tests that I changed the .exp driver to add the -fno-tree-dse flag.  In
> the other cases I just changed the affected tests.
>
> Bootstrapped and regression tested  on x86_64, ppc64le, sparc64, others
> will follow (aarch, ppc64, i686, etc).  It's built toolchains &
> libraries and regression tested on a wide variety of other platforms as
> well.
>
>
> OK for the trunk?

OK.

Thanks,
Richard.

> jeff



More information about the Gcc-patches mailing list