diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-09-28 11:33:11 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-09-28 14:33:53 +0200 |
commit | c32f7df917b01c3636aa85916a36264e807ced9d (patch) | |
tree | 680f004535a2324387441a02202348bd9ae3323c /gcc/opts.c | |
parent | 95540a6d1d7b29cdd3ed06fbcb07465804504cfd (diff) | |
download | gcc-c32f7df917b01c3636aa85916a36264e807ced9d.zip gcc-c32f7df917b01c3636aa85916a36264e807ced9d.tar.gz gcc-c32f7df917b01c3636aa85916a36264e807ced9d.tar.bz2 |
Enable jump threading at -O1.
My previous patch gating all jump threading by -fthread-jumps had the
side effect of turning off DOM jump threading at -O1. This causes
numerous -Wuninitialized false positives. This patch turns on jump
threading at -O1 to minimize the disruption.
gcc/ChangeLog:
* cfgcleanup.c (pass_jump::execute): Check
flag_expensive_optimizations.
(pass_jump_after_combine::gate): Same.
* doc/invoke.texi (-fthread-jumps): Enable for -O1.
* opts.c (default_options_table): Enable -fthread-jumps at -O1.
* tree-ssa-threadupdate.c
(fwd_jt_path_registry::remove_jump_threads_including): Bail unless
flag_thread_jumps.
gcc/testsuite/ChangeLog:
* gcc.dg/auto-init-uninit-1.c: Adjust.
* gcc.dg/auto-init-uninit-15.c: Same.
* gcc.dg/guality/example.c: Same.
* gcc.dg/loop-8.c: Same.
* gcc.dg/strlenopt-40.c: Same.
* gcc.dg/tree-ssa/pr18133-2.c: Same.
* gcc.dg/tree-ssa/pr18134.c: Same.
* gcc.dg/uninit-1.c: Same.
* gcc.dg/uninit-pr44547.c: Same.
* gcc.dg/uninit-pr59970.c: Same.
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -569,6 +569,7 @@ static const struct default_options default_options_table[] = { OPT_LEVELS_1_PLUS, OPT_freorder_blocks, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fshrink_wrap, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fsplit_wide_types, NULL, 1 }, + { OPT_LEVELS_1_PLUS, OPT_fthread_jumps, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_builtin_call_dce, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_ccp, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_ch, NULL, 1 }, @@ -629,7 +630,6 @@ static const struct default_options default_options_table[] = #endif { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_fstore_merging, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_fthread_jumps, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_ftree_pre, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_ftree_switch_conversion, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_ftree_tail_merge, NULL, 1 }, |