diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-09-27 18:18:49 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-09-27 18:18:49 +0200 |
commit | d88780319ef31f9256ab82c9d039a36e3f2b7fd7 (patch) | |
tree | e7326a4169cc25386eb33849cc31b9593463367f /gcc/opts.c | |
parent | 19ecbcbcbf88db0949db1e4eca1fa3dec291be05 (diff) | |
download | gcc-d88780319ef31f9256ab82c9d039a36e3f2b7fd7.zip gcc-d88780319ef31f9256ab82c9d039a36e3f2b7fd7.tar.gz gcc-d88780319ef31f9256ab82c9d039a36e3f2b7fd7.tar.bz2 |
common.opt: Add -foptimize-strlen option.
* common.opt: Add -foptimize-strlen option.
* Makefile.in (OBJS): Add tree-ssa-strlen.o.
(tree-sssa-strlen.o): Add dependencies.
* opts.c (default_options_table): Enable -foptimize-strlen
by default at -O2 if not -Os.
* passes.c (init_optimization_passes): Add pass_strlen
after pass_object_sizes.
* timevar.def (TV_TREE_STRLEN): New timevar.
* params.def (PARAM_MAX_TRACKED_STRLENS): New parameter.
* tree-pass.h (pass_strlen): Declare.
* tree-ssa-strlen.c: New file.
* c-decl.c (merge_decls): If compatible stpcpy prototype
is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
cp/
* decl.c (duplicate_decls): If compatible stpcpy prototype
is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
testsuite/
* gcc.dg/strlenopt-1.c: New test.
* gcc.dg/strlenopt-1f.c: New test.
* gcc.dg/strlenopt-2.c: New test.
* gcc.dg/strlenopt-2f.c: New test.
* gcc.dg/strlenopt-3.c: New test.
* gcc.dg/strlenopt-4.c: New test.
* gcc.dg/strlenopt-4g.c: New test.
* gcc.dg/strlenopt-4gf.c: New test.
* gcc.dg/strlenopt-5.c: New test.
* gcc.dg/strlenopt-6.c: New test.
* gcc.dg/strlenopt-7.c: New test.
* gcc.dg/strlenopt-8.c: New test.
* gcc.dg/strlenopt-9.c: New test.
* gcc.dg/strlenopt-10.c: New test.
* gcc.dg/strlenopt-11.c: New test.
* gcc.dg/strlenopt-12.c: New test.
* gcc.dg/strlenopt-12g.c: New test.
* gcc.dg/strlenopt-13.c: New test.
* gcc.dg/strlenopt-14g.c: New test.
* gcc.dg/strlenopt-14gf.c: New test.
* gcc.dg/strlenopt-15.c: New test.
* gcc.dg/strlenopt-16g.c: New test.
* gcc.dg/strlenopt-17g.c: New test.
* gcc.dg/strlenopt-18g.c: New test.
* gcc.dg/strlenopt.h: New file.
From-SVN: r179279
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -485,6 +485,7 @@ static const struct default_options default_options_table[] = { OPT_LEVELS_2_PLUS, OPT_falign_labels, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_ftree_tail_merge, NULL, 1 }, + { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_foptimize_strlen, NULL, 1 }, /* -O3 optimizations. */ { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, |