if (dump_file)
dump_flow_info (dump_file, dump_flags);
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
- | (flag_thread_jumps ? CLEANUP_THREADING : 0));
+ | (flag_thread_jumps && flag_expensive_optimizations
+ ? CLEANUP_THREADING : 0));
return 0;
}
{}
/* opt_pass methods: */
- virtual bool gate (function *) { return flag_thread_jumps; }
+ virtual bool gate (function *)
+ {
+ return flag_thread_jumps && flag_expensive_optimizations;
+ }
virtual unsigned int execute (function *);
}; // class pass_jump_after_combine
second branch or a point immediately following it, depending on whether
the condition is known to be true or false.
-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
+Enabled at levels @option{-O1}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -fsplit-wide-types
@opindex fsplit-wide-types
{ 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 },
#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 },
/* Spurious uninitialized variable warnings, case 1.
Taken from cppfiles.c (merge_include_chains) */
/* { dg-do compile } */
-/* { dg-options "-O -Wuninitialized -fthread-jumps -ftrivial-auto-var-init=zero" } */
+/* { dg-options "-O -Wuninitialized -ftrivial-auto-var-init=zero" } */
#include "uninit-1.c"
But it is of course ok if we warn in bar about uninitialized use
of j. (not xfailed alternative) */
/* { dg-do compile } */
-/* { dg-options "-O1 -Wuninitialized -fthread-jumps -ftrivial-auto-var-init=zero" } */
+/* { dg-options "-O1 -Wuninitialized -ftrivial-auto-var-init=zero" } */
inline int
foo (int i)
/* { dg-options "-g" } */
+/* { dg-do run { xfail { ! aarch64*-*-* } } } */
/* { dg-xfail-run-if "" aarch64*-*-* "*" { "-O[01g]" } } */
#define GUALITY_DONT_FORCE_LIVE_AFTER -1
/* { dg-do compile } */
-/* { dg-options "-O1 -fthread-jumps -fdump-rtl-loop2_invariant" } */
+/* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-* riscv*-*-* mmix-*-* vax-*-*" } } */
/* Load immediate on condition is available from z13 on and prevents moving
the load out of the loop, so always run this test with -march=zEC12 that
/* PR tree-optimization/83671 - fix for false positive reported by
-Wstringop-overflow does not work with inlining
{ dg-do compile }
- { dg-options "-O1 -fthread-jumps -fdump-tree-optimized" } */
+ { dg-options "-O1 -fdump-tree-optimized" } */
#include "strlenopt.h"
/* { dg-do compile } */
-/* { dg-options "-O1 -fthread-jumps -fdump-tree-optimized-blocks" } */
+/* { dg-options "-O1 -fdump-tree-optimized-blocks" } */
int c, d;
/* { dg-do compile } */
-/* { dg-options "-O1 -fthread-jumps -fdump-tree-optimized" } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
int foo (int a)
{
/* Spurious uninitialized variable warnings, case 1.
Taken from cppfiles.c (merge_include_chains) */
/* { dg-do compile } */
-/* { dg-options "-O -Wuninitialized -fthread-jumps" } */
+/* { dg-options "-O -Wuninitialized" } */
struct list
{
/* PR tree-optimization/44547 - -Wuninitialized reports false warning
in nested switch statements
{ dg-do compile }
- { dg-options "-O1 -Wall -fthread-jumps" } */
+ { dg-options "-O1 -Wall" } */
__attribute__ ((noipa)) int test_O1 (int argc)
{
#pragma GCC pop_options
-#pragma GCC optimize ("Og,thread-jumps")
+#pragma GCC optimize ("Og")
__attribute__ ((noipa)) int
d_demangle_callback_Og (const char *mangled)
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);