/* Spurious uninitialized variable warnings, case 1.
Taken from cppfiles.c (merge_include_chains) */
/* { dg-do compile } */
-/* { dg-options "-O -Wuninitialized -ftrivial-auto-var-init=zero" } */
+/* { dg-options "-O -Wuninitialized -fthread-jumps -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 -ftrivial-auto-var-init=zero" } */
+/* { dg-options "-O1 -Wuninitialized -fthread-jumps -ftrivial-auto-var-init=zero" } */
inline int
foo (int i)
-/* { dg-do run { xfail { ! aarch64*-*-* } } } */
/* { dg-options "-g" } */
/* { dg-xfail-run-if "" aarch64*-*-* "*" { "-O[01g]" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
+/* { dg-options "-O1 -fthread-jumps -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 -fdump-tree-optimized" } */
+ { dg-options "-O1 -fthread-jumps -fdump-tree-optimized" } */
#include "strlenopt.h"
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized-blocks" } */
+/* { dg-options "-O1 -fthread-jumps -fdump-tree-optimized-blocks" } */
int c, d;
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-options "-O1 -fthread-jumps -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" } */
+/* { dg-options "-O -Wuninitialized -fthread-jumps" } */
struct list
{
/* PR tree-optimization/44547 - -Wuninitialized reports false warning
in nested switch statements
{ dg-do compile }
- { dg-options "-O1 -Wall" } */
+ { dg-options "-O1 -Wall -fthread-jumps" } */
__attribute__ ((noipa)) int test_O1 (int argc)
{
#pragma GCC pop_options
-#pragma GCC optimize ("Og")
+#pragma GCC optimize ("Og,thread-jumps")
__attribute__ ((noipa)) int
d_demangle_callback_Og (const char *mangled)
bool
pass_thread_jumps::gate (function *fun ATTRIBUTE_UNUSED)
{
- return flag_expensive_optimizations;
+ return flag_thread_jumps && flag_expensive_optimizations;
}
// Try to thread blocks in FUN. Return TRUE if any jump thread paths were
bool
pass_early_thread_jumps::gate (function *fun ATTRIBUTE_UNUSED)
{
- return true;
+ return flag_thread_jumps;
}
unsigned int
int flags = (EDGE_IGNORE | EDGE_COMPLEX | EDGE_ABNORMAL);
gimple *last;
+ if (!flag_thread_jumps)
+ return;
+
/* If we have an outgoing edge to a block with multiple incoming and
outgoing edges, then we may be able to thread the edge, i.e., we
may be able to statically determine which of the outgoing edges
bool
jt_path_registry::register_jump_thread (vec<jump_thread_edge *> *path)
{
+ gcc_checking_assert (flag_thread_jumps);
+
if (!dbg_cnt (registered_jump_thread))
{
path->release ();