aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2021-09-28 11:33:11 +0200
committerAldy Hernandez <aldyh@redhat.com>2021-09-28 14:33:53 +0200
commitc32f7df917b01c3636aa85916a36264e807ced9d (patch)
tree680f004535a2324387441a02202348bd9ae3323c /gcc/tree-ssa-threadupdate.c
parent95540a6d1d7b29cdd3ed06fbcb07465804504cfd (diff)
downloadgcc-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/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index cf96c90..71e602f 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -2570,7 +2570,7 @@ valid_jump_thread_path (vec<jump_thread_edge *> *path)
void
fwd_jt_path_registry::remove_jump_threads_including (edge_def *e)
{
- if (!m_paths.exists ())
+ if (!m_paths.exists () || !flag_thread_jumps)
return;
edge *slot = m_removed_edges->find_slot (e, INSERT);