re PR tree-optimization/57742 (memset(malloc(n),0,n) -> calloc(n,1))
2014-06-24 Marc Glisse <marc.glisse@inria.fr> PR tree-optimization/57742 gcc/ * tree-ssa-strlen.c (get_string_length): Ignore malloc. (handle_builtin_malloc, handle_builtin_memset): New functions. (strlen_optimize_stmt): Call them. * passes.def: Move strlen after loop+dom but before vrp. gcc/testsuite/ * g++.dg/tree-ssa/calloc.C: New testcase. * gcc.dg/tree-ssa/calloc-1.c: Likewise. * gcc.dg/tree-ssa/calloc-2.c: Likewise. * gcc.dg/strlenopt-9.c: Adapt. From-SVN: r211956
Showing
gcc/testsuite/g++.dg/tree-ssa/calloc.C
0 → 100644
gcc/testsuite/gcc.dg/tree-ssa/calloc-1.c
0 → 100644
gcc/testsuite/gcc.dg/tree-ssa/calloc-2.c
0 → 100644
Please
register
or
sign in
to comment