]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove VRP threader passes in exchange for better threading pre-VRP.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 28 Oct 2021 13:35:21 +0000 (15:35 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 29 Oct 2021 15:57:27 +0000 (17:57 +0200)
This patch upgrades the pre-VRP threading passes to fully resolving
backward threaders, and removes the post-VRP threading passes altogether.
With it, we reduce the number of threaders in our pipeline from 9 to 7.

This will leave DOM as the only forward threader client.  When the ranger
can handle floats, we should be able to upgrade the pre-DOM threaders to
fully resolving threaders and kill the embedded DOM threader.

The numbers are as follows:

prev: # threads in backward + vrp-threaders = 92624
now:  # threads in backward threaders = 94275
Gain: +1.78%

prev: # total threads: 189495
now:  # total threads: 193714
Gain: +2.22%

The numbers are not as great as my initial proposal, but I've
recently pushed all the work that got us to this point ;-).

And... the compilation improves by 1.32%!

There's a regression on uninit-pred-7_a.c that I've yet to look at.  I
want to make sure it's not a missing thread.  If it is, I'll create a PR
and own it.

Also, the tree-ssa/phi_on_compare-*.c tests have all regressed.  This
seems to be some special case the forward threader handles that the
backward threader does not (edge_forwards_cmp_to_conditional_jump*).
I haven't dug deep to see if this is solveable within our
infrastructure, but a cursory look shows that even though the VRP
threader threads this, the *.optimized dump ends with more conditional
jumps than without the optimization.  I'd like to punt on this for
now, because DOM actually catches this through its lone use of the
forward threader (I've adjusted the tests).  However, we will need to
address this sooner or later, if indeed it's still improving the final
assembly.

gcc/ChangeLog:

* passes.def: Replace the pass_thread_jumps before VRP* with
pass_thread_jumps_full.  Remove all pass_vrp_threader instances.
* tree-ssa-threadbackward.c (pass_data_thread_jumps_full):
Remove hyphen from "thread-full" name.

libgomp/ChangeLog:

* testsuite/libgomp.graphite/force-parallel-4.c: Adjust for threading changes.
* testsuite/libgomp.graphite/force-parallel-8.c: Same.

gcc/testsuite/ChangeLog:

* gcc.dg/loop-unswitch-2.c: Adjust for threading changes.
* gcc.dg/old-style-asm-1.c: Same.
* gcc.dg/tree-ssa/phi_on_compare-1.c: Same.
* gcc.dg/tree-ssa/phi_on_compare-2.c: Same.
* gcc.dg/tree-ssa/phi_on_compare-3.c: Same.
* gcc.dg/tree-ssa/phi_on_compare-4.c: Same.
* gcc.dg/tree-ssa/pr20701.c: Same.
* gcc.dg/tree-ssa/pr21001.c: Same.
* gcc.dg/tree-ssa/pr21294.c: Same.
* gcc.dg/tree-ssa/pr21417.c: Same.
* gcc.dg/tree-ssa/pr21559.c: Same.
* gcc.dg/tree-ssa/pr21563.c: Same.
* gcc.dg/tree-ssa/pr49039.c: Same.
* gcc.dg/tree-ssa/pr59597.c: Same.
* gcc.dg/tree-ssa/pr61839_1.c: Same.
* gcc.dg/tree-ssa/pr61839_3.c: Same.
* gcc.dg/tree-ssa/pr66752-3.c: Same.
* gcc.dg/tree-ssa/pr68198.c: Same.
* gcc.dg/tree-ssa/pr77445-2.c: Same.
* gcc.dg/tree-ssa/pr77445.c: Same.
* gcc.dg/tree-ssa/ranger-threader-1.c: Same.
* gcc.dg/tree-ssa/ranger-threader-2.c: Same.
* gcc.dg/tree-ssa/ranger-threader-4.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-1.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-11.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-12.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-14.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-16.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Same.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
* gcc.dg/tree-ssa/ssa-thread-14.c: Same.
* gcc.dg/tree-ssa/ssa-thread-backedge.c: Same.
* gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Same.
* gcc.dg/tree-ssa/vrp02.c: Same.
* gcc.dg/tree-ssa/vrp03.c: Same.
* gcc.dg/tree-ssa/vrp05.c: Same.
* gcc.dg/tree-ssa/vrp06.c: Same.
* gcc.dg/tree-ssa/vrp07.c: Same.
* gcc.dg/tree-ssa/vrp08.c: Same.
* gcc.dg/tree-ssa/vrp09.c: Same.
* gcc.dg/tree-ssa/vrp33.c: Same.
* gcc.dg/uninit-pred-9_b.c: Same.
* gcc.dg/uninit-pred-7_a.c: xfail.

47 files changed:
gcc/passes.def
gcc/testsuite/gcc.dg/loop-unswitch-2.c
gcc/testsuite/gcc.dg/old-style-asm-1.c
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c
gcc/testsuite/gcc.dg/tree-ssa/pr20701.c
gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
gcc/testsuite/gcc.dg/tree-ssa/pr21417.c
gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c
gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c
gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
gcc/testsuite/gcc.dg/tree-ssa/pr68198.c
gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
gcc/testsuite/gcc.dg/tree-ssa/pr77445.c
gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-1.c
gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-2.c
gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-4.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-12.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-14.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-16.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-backedge.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
gcc/testsuite/gcc.dg/tree-ssa/vrp05.c
gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
gcc/testsuite/gcc.dg/uninit-pred-7_a.c
gcc/testsuite/gcc.dg/uninit-pred-9_b.c
gcc/tree-ssa-threadbackward.c
libgomp/testsuite/libgomp.graphite/force-parallel-4.c
libgomp/testsuite/libgomp.graphite/force-parallel-8.c

index 0a0e4fe63ebde1353fda1af0b6cdff5bd21c1226..29921f80ed9aa9d45de03a03047d8f4c94fb67dc 100644 (file)
@@ -210,9 +210,8 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_return_slot);
       NEXT_PASS (pass_fre, true /* may_iterate */);
       NEXT_PASS (pass_merge_phi);
-      NEXT_PASS (pass_thread_jumps);
+      NEXT_PASS (pass_thread_jumps_full);
       NEXT_PASS (pass_vrp, true /* warn_array_bounds_p */);
-      NEXT_PASS (pass_vrp_threader);
       NEXT_PASS (pass_dse);
       NEXT_PASS (pass_dce);
       /* pass_stdarg is always run and at this point we execute
@@ -336,9 +335,8 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_thread_jumps);
       NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
       NEXT_PASS (pass_strlen);
-      NEXT_PASS (pass_thread_jumps);
+      NEXT_PASS (pass_thread_jumps_full);
       NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */);
-      NEXT_PASS (pass_vrp_threader);
       /* Run CCP to compute alignment and nonzero bits.  */
       NEXT_PASS (pass_ccp, true /* nonzero_p */);
       NEXT_PASS (pass_warn_restrict);
index 0931f6e71c3629ea9fd520688977e45b6e694443..f8e99bd16693f404d791d74d4095aae448c199d6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details -fdisable-tree-thread2 -fdisable-tree-thread3" } */
+/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details -fno-thread-jumps" } */
 
 void foo (float **a, float **b, float *c, int n, int m, int l)
 {
index f9406ff0a261ca15ec6645f752dbc579c45b0394..c8fb668ff2999c4c51226f258d0e4950cee9a7d1 100644 (file)
@@ -1,9 +1,6 @@
 /* PR inline-asm/8832 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -dP -fdisable-tree-ethread -fdisable-tree-thread1 -fdisable-tree-thread2 -fdisable-tree-thread3 -fdisable-tree-thread4" } */
-
-/* Note: Threader will duplicate BBs and replace one conditional branch by an
-   unconditional one.  */
+/* { dg-options "-O2 -dP -fno-thread-jumps" } */
 
 /* Verify that GCC doesn't optimize
    old style asm instructions.  */
index 59663dd53147d1a12977c561af33453d0e2ffe59..be504ddb11ae880bdb87f29856b7b13df750a75e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
 
 void g (int);
 void g1 (int);
@@ -27,4 +27,9 @@ f (long a, long b, long c, long d, long x)
   g (a);
 }
 
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* This is actually a regression.  The backward threader cannot thread
+   the above scenario, but it is being caught by the DOM threader
+   which still uses the forward threader.  We should implement this
+   optimization in the backward threader before killing the forward
+   threader.  Similarly for the other phi_on_compare-*.c tests.  */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
index 0c2f6e0e87813a425466dee4ba057317320a3469..b1865701ad8e2b48e7c60da7785362f902eb10c4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
 
 void g (void);
 void g1 (void);
@@ -20,4 +20,4 @@ f (long a, long b, long c, long d, int x)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
index 6a3d3595d8cacb3135683b45ea8241d7ad1506c2..b48ecbf6e61fe3bfe9c342d5a65c8eb92f4679bc 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
 
 void g (void);
 void g1 (void);
@@ -22,4 +22,4 @@ f (long a, long b, long c, long d, int x)
     }
 }
 
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
index 9bc4c6db8e8b18359357a82437e989826511de8a..1e09f89af9f8da949375697074eac968fc19e60b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
 
 void g (int);
 void g1 (int);
@@ -37,4 +37,4 @@ f (long a, long b, long c, long d, int x)
   g (c + d);
 }
 
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
index 496c42567334b539d7127429dd741703ec9b90f4..f05076cafac0cae8ff1237f97531aef80946a83a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fdelete-null-pointer-checks -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fdelete-null-pointer-checks -fno-thread-jumps" } */
 
 typedef struct {
   int code;
index 4ea5f21addf35b31dfeada7ef1f75c20cab49268..f9216a44a754233353bee80c29679108301a9d5f 100644 (file)
@@ -5,7 +5,7 @@
    range information out of the conditional.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fno-thread-jumps -fdump-tree-vrp1-details" } */
 /* { dg-additional-options "-fdisable-tree-ethread -fdisable-tree-thread1" } */
 
 int
index b9edabc62347178830ab7b45b7563d93e72569a9..8c8f4479a77cb6e2d1fa1dd3f49f0aeb4384ac96 100644 (file)
@@ -4,8 +4,7 @@
    allows us to eliminate the second "if" statement.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
-/* { dg-additional-options "-fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-threadfull1 -fdump-tree-vrp1-details" } */
 
 struct f {
   int i;
index b934c9c73d5657bbb7d9162be4d711ec8c51c147..36d9cb0991dcada648964f68c24e237dce516a08 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-thread3 -fdump-tree-thread4-details" } */
+/* { dg-options "-O2 -fdump-tree-thread2-details" } */
 
 struct tree_common 
 { 
@@ -49,5 +49,5 @@ L23:
 /* We should thread the backedge to the top of the loop; ie we only
    execute the if (expr->common.code != 142) test once per loop
    iteration.  */
-/* { dg-final { scan-tree-dump-times "jump thread" 1 "thread4" } } */
+/* { dg-final { scan-tree-dump-times "jump thread" 1 "thread2" } } */
 
index 43f046edabe6c1f4536f5f7677841dd4d4b6b872..83b7c802e358894498e5915edaae2f386ac4fd05 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-evrp-details -fdump-tree-vrp-thread1-details" } */
+/* { dg-options "-O2 -fdump-tree-evrp-details" } */
 
 static int blocksize = 4096;
 
@@ -34,8 +34,3 @@ void foo (void)
 
 /* First, we should simplify the bits < 0 test within the loop.  */
 /* { dg-final { scan-tree-dump-times "Simplified relational" 1 "evrp" } } */
-
-/* We used to check for 3 threaded jumps here, but they all would
-   rotate the loop.  */
-
-
index 72dce83ce37abd2331fa1a93a22bea1142532304..504b3cce6e6a81e37b73d7142c58606854885293 100644 (file)
@@ -2,7 +2,7 @@
    Make sure VRP folds the second "if" statement.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdisable-tree-evrp -fdump-tree-vrp1-details -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-thread-jumps -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
 
 int
 foo (int a)
index a2044d012cc69d5e60591f7a55b7d88e8caee996..102b07346b434f96f031276430165d69acebe217 100644 (file)
@@ -1,6 +1,6 @@
 /* PR tree-optimization/49039 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fno-thread-jumps" } */
 
 extern void bar (void);
 
index 764b3fe2e80cd72eaed237f1ccfa4dcb3576d360..0f66aae87bba1dfc1c8eeba55ae634096f290543 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1-details" } */
+/* { dg-options "-Ofast -fdisable-tree-cunrolli -fdump-tree-threadfull1-details" } */
 
 typedef unsigned short u16;
 typedef unsigned char u8;
@@ -56,7 +56,8 @@ main (int argc, char argv[])
   return crc;
 }
 
-/* None of the threads we can get in vrp-thread1 are valid.  They all
-   cross or rotate loops.  */
-/* { dg-final { scan-tree-dump-not "Registering jump thread" "vrp-thread1" } } */
-/* { dg-final { scan-tree-dump-not "joiner" "vrp-thread1" } } */
+/* We used to have no threads in vrp-thread1 because all the attempted
+   ones would cross loops.  Now we get 30+ threads before VRP because
+   of loop unrolling.  A better option is to disable unrolling and
+   test for the original 4 threads that this test was testing.  */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 4 "threadfull1" } } */
index 0229a823ab7b55b24262b846eea6ff5c24970e47..f5af7a1d6b6758f6a1566d17138880e429bb0fda 100644 (file)
@@ -1,6 +1,6 @@
 /* PR tree-optimization/61839.  */
 /* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-vrp-thread1 -fdisable-tree-evrp -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-threadfull1 -fdump-tree-vrp1 -fdump-tree-optimized" } */
 /* { dg-require-effective-target int32plus } */
 
 __attribute__ ((noinline))
@@ -38,11 +38,11 @@ int main ()
 }
 
 /* Scan for c = 972195717) >> [0, 1] in function foo.  */
-/* { dg-final { scan-tree-dump-times "486097858 : 972195717" 1  "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "486097858 : 972195717" 1  "vrp1" } } */
 
 /* Previously we were checking for two ?: with constant PHI arguments,
    but now we collapse them into one.  */
 /* Scan for c = 972195717) >> [2, 3] in function bar.  */
-/* { dg-final { scan-tree-dump-times "243048929 : 121524464" 1  "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "243048929 : 121524464" 1  "vrp1" } } */
 
 /* { dg-final { scan-tree-dump-times "486097858" 0  "optimized" } } */
index 7be1873282c851bff7cafc07ee2be4cb0576d2f6..bc2126fce4ec74464b9928e42e56c057a85b1abb 100644 (file)
@@ -1,6 +1,6 @@
 /* PR tree-optimization/61839.  */
 /* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-vrp-thread1 -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-threadfull1" } */
 
 __attribute__ ((noinline))
 int foo (int a, unsigned b)
@@ -22,5 +22,5 @@ int main ()
 }
 
 /* Scan for c [12, 13] << 8 in function foo.  */
-/* { dg-final { scan-tree-dump-times "3072 : 3328" 1  "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "3072 : 3328" 1  "vrp1" } } */
 /* { dg-final { scan-tree-dump-times "3072" 0  "optimized" } } */
index ba7025ae33ba78503a70939d4d187350bebc04d5..e9bb744389c20af8418eb3ed0449f816c91ee060 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details -fdump-tree-thread4" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details -fdump-tree-thread2" } */
 
 extern int status, pt;
 extern int count;
@@ -35,7 +35,7 @@ foo (int N, int c, int b, int *a)
 /* There are 2 jump threading opportunities (which don't cross loops),
    all of which will be realized, which will eliminate testing of
    FLAG, completely.  */
-/* { dg-final { scan-tree-dump-times "Registering jump" 2 "thread1"} } */
+/* { dg-final { scan-tree-dump-times "Registering jump" 2 "threadfull1"} } */
 
 /* We used to remove references to FLAG by DCE2, but this was
    depending on early threaders threading through loop boundaries
@@ -43,4 +43,4 @@ foo (int N, int c, int b, int *a)
    run after loop optimizations , can successfully eliminate the
    references to FLAG.  Verify that ther are no references by the late
    threading passes.  */
-/* { dg-final { scan-tree-dump-not "if .flag" "thread4"} } */
+/* { dg-final { scan-tree-dump-not "if .flag" "thread2"} } */
index af8b7a5bc5777c8cbd1e85dd06cce5e785f62d03..125072941da7d538fdbb9a8200f3cf865cb030e6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details -fdisable-tree-ethread" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details -fdisable-tree-ethread" } */
 
 extern void abort (void);
 
@@ -38,4 +38,4 @@ c_finish_omp_clauses (tree clauses)
 }
 
 /* There are 3 jump threading opportunities.  */
-/* { dg-final { scan-tree-dump-times "Registering jump" 3 "thread1"} } */
+/* { dg-final { scan-tree-dump-times "Registering jump" 3 "threadfull1"} } */
index f2a5e78e6bee38f2d4f5e4ba46cec4bc65d5e81c..b3db1bca6173d58620a4307fa5fdcf4231761775 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-thread-details-blocks-stats" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-thread-details-blocks-stats -fdump-tree-threadfull1-blocks-stats -fdump-tree-threadfull2-blocks-stats" } */
 typedef enum STATES {
        START=0,
        INVALID,
@@ -123,8 +123,8 @@ enum STATES FMS( u8 **in , u32 *transitions) {
    aarch64 has the highest CASE_VALUES_THRESHOLD in GCC.  It's high enough
    to change decisions in switch expansion which in turn can expose new
    jump threading opportunities.  Skip the later tests on aarch64.  */
-/* { dg-final { scan-tree-dump "Jumps threaded: \[7-9\]" "thread2" } } */
+/* { dg-final { scan-tree-dump "Jumps threaded: \[7-9\]" "thread1" } } */
 /* { dg-final { scan-tree-dump-not "optimizing for size" "thread1" } } */
-/* { dg-final { scan-tree-dump-not "optimizing for size" "thread2" } } */
-/* { dg-final { scan-tree-dump-not "optimizing for size" "thread3" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-not "optimizing for size" "thread4" { target { ! aarch64*-*-* } } } } */ 
+/* { dg-final { scan-tree-dump-not "optimizing for size" "threadfull1" } } */
+/* { dg-final { scan-tree-dump-not "optimizing for size" "thread2" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump-not "optimizing for size" "threadfull2" { target { ! aarch64*-*-* } } } } */ 
index 883a63d70fc80b9d0ae7556a1f40225691a008c0..72bf0eca81fd8cd243b0b5cca8c7a9e3d8f018c3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread3-details-blocks -fno-early-inlining -fno-tree-vrp -fno-tree-dominator-opts" } */
+/* { dg-options "-O2 -fno-early-inlining -fno-tree-vrp -fno-tree-dominator-opts -fdump-tree-thread2-details-blocks" } */
 
 static int a;
 static int b;
@@ -25,5 +25,5 @@ main (int argc)
   if (b)
     test2 ();
 }
-/* { dg-final { scan-tree-dump-times "Registering jump thread" 2 "thread3" } } */
-/* { dg-final { scan-tree-dump-not "Invalid sum" "thread3" } } */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 2 "thread2" } } */
+/* { dg-final { scan-tree-dump-not "Invalid sum" "thread2" } } */
index c3ccb5d5b7e48de794c571f1e612298bb674debe..c6c2b2b78a5ac3aa64efe2444f2e4c388063c302 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details --param logical-op-non-short-circuit=1" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details --param logical-op-non-short-circuit=1" } */
 
 // Copied from ssa-dom-thread-11.c
 
@@ -17,4 +17,4 @@ mark_target_live_regs (int b, int block, int bb_tick)
 /* When the first two conditionals in the first IF are true, but
    the third conditional is false, then there's a jump threading
    opportunity to bypass the second IF statement.  */
-/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "thread1"} } */
+/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "threadfull1"} } */
index d2689b6c788e94907d06a6f63cae6d2ed9eb0d88..163d9e1cf083c321b16b6e6ad7fc1e5cfea9679f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-thread2-details -w" } */
+/* { dg-options "-O2 -fdump-tree-thread1-details -w" } */
 
 // Copied from ssa-dom-thread-12.c.
 
@@ -36,4 +36,4 @@ scan_function (gimple stmt)
    that stmt->num_ops - 3 != 0.  When that test is false, we can derive
    a value for stmt->num_ops.  That in turn allows us to thread the jump
    for the conditional at the start of the call to gimple_op.  */
-/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "thread2"} } */
+/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "thread1"} } */
index d5aa2e8912861a71f16037ee3cbf5f4286d28fe0..dde43ff886c89dc6239a21003871ed3fdbd67c79 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-O2 -fdump-tree-vrp-details -fdump-tree-thread1-details --param logical-op-non-short-circuit=1" }  */
-/* { dg-final { scan-tree-dump-times "Registering jump" 8 "thread1" } }  */
+/* { dg-additional-options "-O2 -fdump-tree-threadfull1-details --param logical-op-non-short-circuit=1" }  */
+/* { dg-final { scan-tree-dump-times "Registering jump" 8 "threadfull1" } }  */
 
 /* Copied from ssa-thread-14.  */
 
index 759d9ab7afa652854c7fde81cbd690e936091737..5b2ac53731cbabf665732f064376e76453e91bf5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fno-tree-vrp -fdump-tree-dom2-details" } */
+/* { dg-options "-O2 -fno-tree-vrp -fdisable-tree-threadfull1 -fdump-tree-dom2-details" } */
 void t(void);
 void q(void);
 void q1(void);
index 73969bbe1e545b047f6d4d320d5c00ab2b826927..bcc9ccf8f282959ebd223c51034297e4e92373aa 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-details --param logical-op-non-short-circuit=1 -fdisable-tree-thread1 -fdisable-tree-thread2 -fdisable-tree-vrp-thread1 " } */
+/* { dg-options "-O2 -fdump-tree-dom2-details --param logical-op-non-short-circuit=1 -fdisable-tree-thread1 -fdisable-tree-thread2 -fdisable-tree-threadfull1" } */
 
 static int *bb_ticks;
 extern void frob (void);
index bad5e0a782d31b14979e9ff1cced1714888a99e8..e68acbbc5d9a6637b3a189089e7a067b466d3926 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-dom2-details -w -fdisable-tree-thread2" } */
+/* { dg-options "-O2 -fdump-tree-dom2-details -w -fdisable-tree-thread1" } */
 typedef long unsigned int size_t;
 union tree_node;
 typedef union tree_node *tree;
index a25fe8bd89e80ab9a763749e03bfd6638fb9ff60..8497ed6b4a4ee32417aa1d33ae97efc2ac536039 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1" } */
-/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-ethread -fdisable-tree-thread2" } */
+/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-ethread -fdisable-tree-threadfull1" } */
 
 enum optab_methods
 {
index 1b677f44b4017be5fec389d1b41e9f599eb70500..e8555f2d9636f97cf468c10de2d59cd13820fd03 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1 -fdisable-tree-vrp-thread1" } */
+/* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1 -fdisable-tree-threadfull1" } */
 unsigned char
 validate_subreg (unsigned int offset, unsigned int isize, unsigned int osize, int zz, int qq)
 {
index 823ada982ff6a4be4cea54011843445afe81f9fb..74a55aa51832bf26769b90c86625263365a69aab 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */ 
-/* { dg-options "-O2 -fdump-tree-thread3-stats -fdump-tree-dom2-stats -fdisable-tree-ethread" } */
+/* { dg-options "-O2 -fdump-tree-thread2-stats -fdump-tree-dom2-stats -fdisable-tree-ethread" } */
 
 void foo();
 void bla();
@@ -26,4 +26,4 @@ void thread_latch_through_header (void)
    case.  And we want to thread through the header as well.  These
    are both caught by threading in DOM.  */
 /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2"} } */
-/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "thread3"} } */
+/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "thread2"} } */
index ee17edd7934bdb6e1f4b96707eba9077e2d1c430..d40a61fd725f90c3f8e4d16092640880edd52c7e 100644 (file)
@@ -1,15 +1,18 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-stats -fdump-tree-thread3-stats -fdump-tree-dom3-stats -fdump-tree-vrp-thread2-stats -fno-guess-branch-probability" } */
+/* { dg-options "-O2 -fdump-tree-dom2-stats -fdump-tree-thread2-stats -fdump-tree-dom3-stats -fno-guess-branch-probability" } */
 
 /* { dg-final { scan-tree-dump-not "Jumps threaded"  "dom2" } } */
 
+/* We were previously checking for no threads in vrp-thread2, but now
+   that we have merged the post and pre threaders, we get a dozen
+   threads before VRP2.  */
+
 /* aarch64 has the highest CASE_VALUES_THRESHOLD in GCC.  It's high enough
    to change decisions in switch expansion which in turn can expose new
    jump threading opportunities.  Skip the later tests on aarch64.  */
 /* { dg-final { scan-tree-dump-not "Jumps threaded"  "dom3" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-not "Jumps threaded"  "vrp-thread2" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump "Jumps threaded: 11"  "thread3" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump "Jumps threaded: 18"  "thread3" { target { aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump "Jumps threaded: 11"  "thread2" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump "Jumps threaded: 18"  "thread2" { target { aarch64*-*-* } } } } */
 
 enum STATE {
   S0=0,
index 8c5cc8228fb443a1ba6e790d1959d9723c434d46..51fc06571220d87f66725ca462e6b1265b464524 100644 (file)
@@ -1,7 +1,6 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-O2 -fdump-tree-vrp-thread1-details --param logical-op-non-short-circuit=1" }  */
-/* { dg-additional-options "-fdisable-tree-thread1" } */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 8 "vrp-thread1" } }  */
+/* { dg-additional-options "-O2 --param logical-op-non-short-circuit=1 -fdump-tree-threadfull1-details" }  */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 8 "threadfull1" } }  */
 
 void foo (void);
 void bar (void);
index 890a0ee10ec46f59a46748e784ede5f9e8ca2f27..ef9a3e8c22bc0259a07f0d784130ac6bc9836e0d 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile }
-// { dg-options "-O2 -fdisable-tree-ethread -fdisable-tree-thread1 -fdisable-tree-thread2 -fno-tree-dominator-opts -fdump-tree-thread3-details" }
+// { dg-options "-O2 -fdisable-tree-ethread -fdisable-tree-thread1 -fdisable-tree-thread2 -fno-tree-dominator-opts -fdump-tree-threadfull2-details" }
 
 // Test that we can thread jumps across the backedge of a loop through
 // the switch statement to a particular case.
@@ -29,4 +29,4 @@ int foo (unsigned int x, int s)
   return s;
 }
 
-// { dg-final { scan-tree-dump "Registering jump thread:.*normal \\(back\\)" "thread3" } }
+// { dg-final { scan-tree-dump "Registering jump thread:.*normal \\(back\\)" "threadfull2" } }
index f3ca140bd26eacdeb2e02c15c8f0ae42304392b4..25c2d3a8614f54c304ba729c1b6b73024646d887 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details -fdelete-null-pointer-checks" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details -fdelete-null-pointer-checks" } */
 /* { dg-skip-if "" keeps_null_pointer_checks } */
 
 void oof (void);
@@ -29,5 +29,5 @@ build_omp_regions_1 (basic_block bb, struct omp_region *parent,
 
 /* ARM Cortex-M defined LOGICAL_OP_NON_SHORT_CIRCUIT to false,
    so skip below test.  */
-/* { dg-final { scan-tree-dump-times "Registering jump thread" 1 "thread1" { target { ! arm_cortex_m } } } } */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 1 "threadfull1" { target { ! arm_cortex_m } } } } */
 
index 2285c55c7d2573edcfe0008868ca6c08e4e7c6a8..6e9c8df2f0a2336c1caa8bbd88ec35b258a13231 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fdelete-null-pointer-checks -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fdelete-null-pointer-checks -fdisable-tree-evrp -fno-thread-jumps" } */
 
 struct A
 {
index 1d7ea4e8ffb251255e795e2f474e02e432c1a9ec..4cbaca4133212254a05276693f4d988dd699970c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fno-thread-jumps" } */
 
 struct A
 {
index c17cd1b5738de5b709a3f75e81992adb587ad4e1..7f38e8d3852ba939829875668d061f0b1fbe195f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fno-thread-jumps" } */
 
 
 inline int ten()
index acb03c29aa42462d88012970d63298bde9c15812..898477e42fbceed499e958759aa3957ff04e12d0 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fno-thread-jumps" } */
 
 int baz (void);
 
index 31a541522f56dafa950c8fff0bff6ef82910b8ec..9c4acd29681f621c740dc00df8ac5053c807876d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fdelete-null-pointer-checks -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fdelete-null-pointer-checks -fno-thread-jumps" } */
 
 int
 foo (int i, int *p)
index 2c6742b76c76fcf446c8a41c0fadb265a94421ff..4599fa7d533a90a9642580d26579831f8c24aab1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fdisable-tree-thread1 -fdelete-null-pointer-checks" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fno-thread-jumps -fdelete-null-pointer-checks" } */
 
 /* Compile with -fno-tree-fre -O2 to prevent CSEing *p.  */
 int
index fad0051cb095579096bfeac56bd22e71066c1a3e..4e4954da32aef7006011511af82df3eae1ba32c1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1 -std=gnu89 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1 -std=gnu89 -fno-thread-jumps" } */
 
 foo (int *p)
 {
index 88833eb701ea7cdcc3c38c1e5610af5800b14587..470675ef50e5b1530afdd0987e2ac3222c6cc60c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fno-tree-fre -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fno-tree-fre -fdisable-tree-evrp -fno-thread-jumps" } */
 
 /* This is from PR14052.  */
 
index c2ba2a4248d707b8d2bd6d112d525c4d89984c8a..434d90ac57038f7e4d7d617b767e40917bea5100 100644 (file)
@@ -23,7 +23,7 @@ int foo (int n, int l, int m, int r)
       blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
 
   if ( l )
-      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
+      blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail *-*-* } } */
 
   return 0;
 }
index 8c2d28cbe78ced185b666b7dd4d3bc7a08f1f80b..552ab8b4ff4e6b6dc2c70291789b41f38555c8b5 100644 (file)
@@ -17,10 +17,10 @@ int foo (int n, int l, int m, int r)
 
   if (l > 100)
     if ( (n <= 9) &&  (m < 100)  && (r < 19) )
-      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
+      blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail powerpc64*-*-* } } */
 
   if ( (n <= 8) &&  (m < 99)  && (r < 19) )
-      blah(v); /* { dg-bogus "uninitialized" "pr101674" { xfail powerpc64*-*-* mmix-*-* cris-*-* } } */
+      blah(v); /* { dg-bogus "uninitialized" "pr101674" { xfail mmix-*-* cris-*-* } } */
 
   return 0;
 }
index 456effca5e1201382bd8e89cbe4278c299ae6b5c..9979bfdedf44794c6cdd8b72f886ab3399de9a22 100644 (file)
@@ -955,7 +955,7 @@ const pass_data pass_data_thread_jumps =
 const pass_data pass_data_thread_jumps_full =
 {
   GIMPLE_PASS,
-  "thread-full",
+  "threadfull",
   OPTGROUP_NONE,
   TV_TREE_SSA_THREAD_JUMPS,
   ( PROP_cfg | PROP_ssa ),
index 6caa934c51939595b77b8fc6915beccafdd309d5..587c0a124976ec29e5e3043ba7df42b29e1ba53d 100644 (file)
@@ -1,5 +1,5 @@
 /* Autopar with IF conditions.  */
-/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-vrp-thread1" } */
+/* { dg-additional-options "-fno-thread-jumps" } */
 
 void abort();
 
index 6868dd291471400b62a2b1f6e59ae61aed0b24d7..ee5a67aa2b0913a78809dc0e388212992aa2898a 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-vrp-thread1 --param max-stores-to-sink=0" } */
+/* { dg-additional-options "-fno-thread-jumps --param max-stores-to-sink=0" } */
 
 #define N 1500