aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2017-01-28 19:06:17 (GMT)
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-02-12 00:47:43 (GMT)
commit8b066eb1d1aafb559890836e254ebf1ebd7de9a5 (patch)
tree462d4f570ef836cf0f5e8f7e9a853de3b4c3ad25 /gcc-4.9
parent4bd43c54babe00722e71026a039cdd238fa420f3 (diff)
downloadtoolchain_gcc-8b066eb1d1aafb559890836e254ebf1ebd7de9a5.zip
toolchain_gcc-8b066eb1d1aafb559890836e254ebf1ebd7de9a5.tar.gz
toolchain_gcc-8b066eb1d1aafb559890836e254ebf1ebd7de9a5.tar.bz2
Fix GCC bug PR 46639, for kernel security
The kernel security team asked us to fix this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 This CL does that. Note: This CL depends on https://android-review.googlesource.com/329799 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 Test: Ran build.py for all toolchain versions; used resulting compilers to build bullhead, angler and fugu plaform images. Ran checkbuild.py. Change-Id: I1e1abf594cff56c6ed6dc228a1d084da18c11420
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/gcc/passes.def3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c5
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c4
-rw-r--r--gcc-4.9/gcc/tree-pass.h1
-rw-r--r--gcc-4.9/gcc/tree-vrp.c54
52 files changed, 219 insertions, 180 deletions
diff --git a/gcc-4.9/gcc/passes.def b/gcc-4.9/gcc/passes.def
index b88bcb2..0bec5c3 100644
--- a/gcc-4.9/gcc/passes.def
+++ b/gcc-4.9/gcc/passes.def
@@ -75,12 +75,13 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_fre);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_merge_phi);
+ NEXT_PASS (pass_profile);
+ NEXT_PASS (pass_early_vrp);
NEXT_PASS (pass_cd_dce);
NEXT_PASS (pass_early_ipa_sra);
NEXT_PASS (pass_tail_recursion);
NEXT_PASS (pass_convert_switch);
NEXT_PASS (pass_cleanup_eh);
- NEXT_PASS (pass_profile);
NEXT_PASS (pass_local_pure_const);
/* Split functions creates parts that are not run through
early optimizations again. It is thus good idea to do this
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c
index 15ea462..4d0b855 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-tail-merge -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-tail-merge -fdump-tree-vrp" } */
extern void abort (void);
@@ -15,6 +15,5 @@ main(void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Removing basic block" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Removing basic block" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c
index 1a804a7..0336011 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c
@@ -11,7 +11,7 @@ main()
a[i]/=b;
return 0;
}
-/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */
+/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" { xfail *-*-* } } } */
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c
index 1a804a7..9709d80 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c
@@ -11,7 +11,7 @@ main()
a[i]/=b;
return 0;
}
-/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */
+/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" { xfail *-*-* } } } */
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
index f99598d..8b6d5c3 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
@@ -49,6 +49,7 @@ get_alias_set (t)
/* There should be one IF statement (the complex return statement should
collapse down to a simple return 0 without any conditionals). */
-/* { dg-final { scan-tree-dump-times "if " 1 "cddce2"} } */
+/* { dg-final { scan-tree-dump-times "if " 0 "cddce2"} } */
+/* { dg-final { scan-tree-dump-times "0B ? " 1 "cddce2"} } */
/* { dg-final { cleanup-tree-dump "cddce2" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c
index 8e9f61d..50d18e7 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c
@@ -28,5 +28,6 @@ void foo(int edx, int eax)
/* After cddce we should have two IF statements remaining as the other
two tests can be threaded. */
-/* { dg-final { scan-tree-dump-times "if " 2 "cddce2"} } */
-/* { dg-final { cleanup-tree-dump "cddce2" } } */
+/* { dg-final { scan-tree-dump-times " == " 2 "cddce2"} } */
+/* { dg-final { scan-tree-dump-times " & " 1 "cddce2"} } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
index 1b302ae..99cb0cc 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
-/* { dg-options "-O2 -fdump-tree-original -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-original -fdump-tree-vrp" } */
extern int* f(int) __attribute__((returns_nonnull));
extern void eliminate ();
@@ -14,6 +14,6 @@ void h () {
}
/* { dg-final { scan-tree-dump-times "== 0" 1 "original" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 1 "vrp" } } */
/* { dg-final { cleanup-tree-dump "original" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c
index 1c3dbf9..abb14e6 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c
@@ -3,7 +3,7 @@
statement, which was needed to eliminate the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
int
foo (int a)
@@ -14,5 +14,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c
index ce62fa3..f4f7a3d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c
@@ -4,7 +4,7 @@
immediate successors of the basic block. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
extern void bar (int);
@@ -26,6 +26,6 @@ foo (int *p, int b)
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
index 888d609..f4d609a 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
@@ -5,7 +5,7 @@
range information out of the conditional. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
int
foo (int a)
@@ -17,5 +17,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c
index f924d26..1ae037f 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-dce1" } */
+/* { dg-options "-O2 -fdump-tree-vrp -fdump-tree-dce1" } */
int
foo (int *p)
@@ -16,9 +16,9 @@ foo (int *p)
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump "Folding predicate " "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate " 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "Folding predicate " "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate " 0 "vrp" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { scan-tree-dump-not "b_. =" "dce1" { target { ! avr-*-* } } } } */
/* { dg-final { scan-tree-dump "b_. =" "dce1" { target { avr-*-* } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
/* { dg-final { cleanup-tree-dump "dce1" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
index 40d960d..facd96c 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
int g, h;
@@ -19,5 +19,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
index 567e636..dc90dbd 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
@@ -4,7 +4,7 @@
allows us to eliminate the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
struct f {
int i;
@@ -19,5 +19,5 @@ foo (struct f *p)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c
index 01777f6..0222e7a 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void g (void);
extern void bar (int);
@@ -16,5 +16,5 @@ foo (int a)
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
index 6378d1a..fe558e5 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details -fdump-tree-vrp1-details" } */
static int blocksize = 4096;
@@ -32,13 +32,13 @@ void foo (void)
/* First, we should simplify the bits < 0 test within the loop. */
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
/* Second, we should thread the edge out of the loop via the break
statement. We also realize that the final bytes == 0 test is useless,
and thread over it. We also know that toread != 0 is useless when
entering while loop and thread over it. */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 3 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
index 8e6c578..b3c4588 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
@@ -2,7 +2,7 @@
Make sure VRP folds the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
int
foo (int a)
@@ -13,5 +13,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c
index d265d5e..0955c45 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c
@@ -3,7 +3,7 @@
known to be zero after entering the first two "if" statements. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
void
foo (int *p, int q)
@@ -19,5 +19,5 @@ foo (int *p, int q)
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate r_.* != 0B to 0" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate r_.* != 0B to 0" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
index 5381396..53d0425 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp" } */
int g (int i, int j)
{
@@ -15,5 +15,5 @@ int g (int i, int j)
return 1;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c
index daff68e..cb0589e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c
@@ -3,7 +3,7 @@
Check that VRP now gets ranges from BIT_AND_EXPRs. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp" } */
int
foo (int a)
@@ -15,5 +15,5 @@ foo (int a)
return 1;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate b_.* > 300 to 0" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate b_.* > 300 to 0" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
index aea35cc..b4c0677 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
struct foo1 {
int i:1;
@@ -44,5 +44,5 @@ int test4 (struct foo2 *x)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding" 3 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding" 3 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
index 3500dbf..3401ac6 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/49039 */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void bar (void);
@@ -24,8 +24,8 @@ foo (unsigned int x, unsigned int y)
bar ();
}
-/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 5 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 6 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 5 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 6 to 0" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 5 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 6 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 5 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 6 to 0" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
index a42edf9..c9b877e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void eliminate (void);
extern void* f1 (void *a, void *b) __attribute__((nonnull));
@@ -15,5 +15,5 @@ void g2 (void*p, void*q){
eliminate ();
}
-/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
index bc9d730..aeecdf1 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp1-details" } */
+/* { dg-options "-Ofast -fdump-tree-vrp-details" } */
typedef unsigned short u16;
typedef unsigned char u8;
@@ -53,6 +53,5 @@ main (int argc, char argv[])
return crc;
}
-/* { dg-final { scan-tree-dump "Cancelling" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump "Cancelling" "vrp" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c
index 6aaea8e..47456be 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-stats -fdump-tree-dom1-stats" } */
+/* { dg-options "-O2 -fdump-tree-vrp-stats -fdump-tree-dom1-stats" } */
void foo();
void bla();
@@ -111,9 +111,9 @@ void dont_thread_4 (int a, int nfirst)
} while (i++ < 100);
}
-/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "vrp1"} } */
-/* { dg-final { scan-tree-dump-times "Jumps threaded: 2" 0 "vrp1"} } */
+/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "vrp"} } */
+/* { dg-final { scan-tree-dump-times "Jumps threaded: 2" 0 "vrp"} } */
/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 0 "dom1"} } */
/* { dg-final { scan-tree-dump-times "Jumps threaded: 2" 1 "dom1"} } */
/* { dg-final { cleanup-tree-dump "dom1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
index 476ee5e..b25582d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
struct basic_block_def;
@@ -28,6 +28,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 "Threaded" 1 "vrp1" { target { ! arm_cortex_m } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp" { target { ! arm_cortex_m } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c
index 3f8e820..1edda29 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int *p, int i)
{
@@ -24,5 +24,5 @@ foo (int *p, int i)
return i;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
index 56fca97..9984bd2 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
struct A
{
@@ -20,6 +20,6 @@ foo (struct A *p, struct A *q)
return x + p->b;
}
/* Target with fno-delete-null-pointer-checks should not fold check */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
index 9b7c082..20fcb91 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
struct A
{
@@ -30,6 +30,6 @@ foo (struct A *p, struct A *q)
return q->a;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate q_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate r_.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate q_.*to 1" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate r_.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c
index bf5d683..2632248 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int a, int b)
{
@@ -9,5 +9,5 @@ foo (int a, int b)
return a + b;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate a_.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate a_.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
index cb6df0d..a59cb86 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int i, int j, int a)
{
@@ -25,7 +25,7 @@ foo (int i, int j, int a)
return i + a + j;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp1" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
index 6584919..d546f84 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
foo (int i, int *p)
{
@@ -30,10 +30,10 @@ foo (int i, int *p)
return i;
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 2 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 1 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 2 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 1 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
index 193199f..6a7dec0 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp-details" } */
/* Compile with -fno-tree-fre -O2 to prevent CSEing *p. */
foo (int a, int *p)
@@ -18,7 +18,7 @@ foo (int a, int *p)
return a;
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_.* ne_expr 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "PREDICATE: p_.* ne_expr 0" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
index 9ff0f14..6a2c983 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int *p)
{
@@ -27,5 +27,5 @@ L78:
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.. != 0B to 1" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.. != 0B to 1" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c
index 166529a..cb8a5d7 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
extern void abort (void) __attribute__ ((__noreturn__));
@@ -18,6 +18,5 @@ nonlocal_mentioned_p (rtx x)
abort ();
}
-/* { dg-final { scan-tree-dump-times "Folding predicate .*to 0" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Folding predicate .*to 0" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
index c04b9ba..f236e40 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void abort (void) __attribute__ ((__noreturn__));
union tree_node;
@@ -27,6 +27,5 @@ gimplify_for_stmt (tree stmt)
abort ();
}
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c
index a3cc536..366c079 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
static int blocksize = 4096;
@@ -30,5 +30,5 @@ void foo (void)
eof_reached = 1;
}
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c
index e4c884a..45a85fa 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp1" } */
+/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp" } */
#include <limits.h>
extern void abort ();
@@ -22,6 +22,6 @@ int g (int b) {
}
return 1;
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. < 0 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate b_. >= 0 to 1" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. < 0 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate b_. >= 0 to 1" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
index 14da7df..91c195b 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp1" } */
+/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp" } */
extern void abort ();
extern void exit (int);
@@ -23,6 +23,6 @@ int g (int b) {
return 1;
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. == 0 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate b_. != 0 to 1" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. == 0 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate b_. != 0 to 1" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
index 77899a6..1f379e8 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
blah (int code1, int code2)
{
@@ -40,6 +40,5 @@ L8:
/* The n_sets > 0 test can be simplified into n_sets == 1 since the
only way to reach the test is when n_sets <= 1, and the only value
which satisfies both conditions is n_sets == 1. */
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c
index 85e5b62..1aae964 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
struct rtx_def;
@@ -86,6 +86,5 @@ L7:
The second n_sets > 0 test can also be simplified into n_sets == 1
as the only way to reach the tests is when n_sets <= 1 and the only
value which satisfies both conditions is n_sets == 1. */
-/* { dg-final { scan-tree-dump-times "Simplified relational" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Simplified relational" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c
index fa8bbfd..79411bf 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
extern void abort ();
int tree_code_length[100];
@@ -47,6 +47,5 @@ L9:
/* The second test of (code1 != 53) and the test (D18670 <= 2) are
both totally subsumed by earlier tests and thus should be folded
away using VRP. */
-/* { dg-final { scan-tree-dump-times "Folding predicate" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Folding predicate" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
index 13f60a6..3a1b9e4 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
/* This is from PR14052. */
int f2(int x) { return x == 1 || x == 3 || x == 1; }
-/* { dg-final { scan-tree-dump "Folding predicate.*== 1 to 0" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate.*== 1 to 0" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c
index fd92eca..7b20202 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
void bar (void);
@@ -15,6 +15,6 @@ foo (int a)
}
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. > 2 to 1" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate a_. <= 5 to 1" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. > 2 to 1" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. <= 5 to 1" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
index a67e839..6c29ade 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
void
func_18 ( int t )
@@ -24,5 +24,5 @@ func_18 ( int t )
/* There should be a single if left. */
-/* { dg-final { scan-tree-dump-times "if" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "if" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
index 7a3e726..764911c 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-blocks-vops-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-blocks-vops-details" } */
fu (char *p, int x)
{
@@ -9,7 +9,6 @@ fu (char *p, int x)
arf ();
}
-/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c
index 912d28e..55ea1e3 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
typedef struct basic_block_def *basic_block;
struct basic_block_def;
struct edge_def;
@@ -37,6 +37,5 @@ cleanup_empty_eh (basic_block bb)
foo ();
}
}
-/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
index aa10af2..7462f4d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
long long
foo (long long a, signed char b, signed char c)
@@ -8,6 +8,6 @@ foo (long long a, signed char b, signed char c)
return a + (short)bc;
}
-/* { dg-final { scan-tree-dump "Folded into" "vrp1" { target int32plus } } } */
-/* { dg-final { scan-tree-dump "Folding statement: _\[0-9\]\* = \\(long long int\\) bc_\[0-9\]\*;" "vrp1" { target int16 } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folded into" "vrp" { target int32plus } } } */
+/* { dg-final { scan-tree-dump "Folding statement: _\[0-9\]\* = \\(long long int\\) bc_\[0-9\]\*;" "vrp" { target int16 } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
index f02d837..74a2647 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
unsigned foo (unsigned i)
{
@@ -34,5 +34,5 @@ unsigned baz (unsigned i)
return i;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 3 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 3 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
index ab399b5..9d1471b 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
@@ -2,7 +2,7 @@
when evaluating an && condition. VRP is not able to optimize this. */
/* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* } } } } } */
-/* { dg-options "-O2 -fdump-tree-vrp2-details -fdump-tree-cddce2-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp1-details -fdump-tree-cddce1-details" } */
struct bitmap_head_def;
typedef struct bitmap_head_def *bitmap;
@@ -75,10 +75,9 @@ bitmap_ior_into (bitmap a, const_bitmap b)
}
/* Verify that VRP simplified an "if" statement. */
-/* { dg-final { scan-tree-dump "Folded into: if.*" "vrp2"} } */
-/* Verify that DCE after VRP2 eliminates a dead conversion
+/* { dg-final { scan-tree-dump "Folded into: if.*" "vrp1"} } */
+/* Verify that DCE after VRP1 eliminates a dead conversion
to a (Bool). */
-/* { dg-final { scan-tree-dump "Deleting.*_Bool.*;" "cddce2"} } */
-/* { dg-final { cleanup-tree-dump "vrp2" } } */
-/* { dg-final { cleanup-tree-dump "cddce2" } } */
-
+/* { dg-final { scan-tree-dump "Deleting.*_Bool.*;" "cddce1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c b/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
index 6291096..9bb2e62 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
@@ -70,8 +70,6 @@ int main (int argc, const char* argv[])
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
-
-
diff --git a/gcc-4.9/gcc/tree-pass.h b/gcc-4.9/gcc/tree-pass.h
index 3d81a71..9c04124 100644
--- a/gcc-4.9/gcc/tree-pass.h
+++ b/gcc-4.9/gcc/tree-pass.h
@@ -433,6 +433,7 @@ extern gimple_opt_pass *make_pass_fre (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_check_data_deps (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_copy_prop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_isolate_erroneous_paths (gcc::context *ctxt);
+extern gimple_opt_pass *make_pass_early_vrp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_vrp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_uncprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_return_slot (gcc::context *ctxt);
diff --git a/gcc-4.9/gcc/tree-vrp.c b/gcc-4.9/gcc/tree-vrp.c
index fb3e05d..cdbafeb 100644
--- a/gcc-4.9/gcc/tree-vrp.c
+++ b/gcc-4.9/gcc/tree-vrp.c
@@ -97,6 +97,11 @@ typedef struct value_range_d value_range_t;
for still active basic-blocks. */
static sbitmap *live;
+/* Certain VRP actions should not be done in the early VRP pass. This
+ variable indicates whether or not we are in the early VRP pass, and
+ is used to control those actions. */
+static bool is_early_vrp = false;
+
/* Return true if the SSA name NAME is live on the edge E. */
static bool
@@ -3594,7 +3599,8 @@ extract_range_basic (value_range_t *vr, gimple stmt)
array bound warnings.
??? We could do this as early as inlining is finished. */
arg = gimple_call_arg (stmt, 0);
- if (TREE_CODE (arg) == SSA_NAME
+ if (!is_early_vrp
+ && TREE_CODE (arg) == SSA_NAME
&& SSA_NAME_IS_DEFAULT_DEF (arg)
&& TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL)
{
@@ -6218,6 +6224,9 @@ check_array_ref (location_t location, tree ref, bool ignore_off_by_one)
if (TREE_NO_WARNING (ref))
return;
+ if (is_early_vrp)
+ return;
+
low_sub = up_sub = TREE_OPERAND (ref, 1);
up_bound = array_ref_up_bound (ref);
@@ -9821,12 +9830,14 @@ vrp_finalize (void)
probabilities to aid branch prediction. */
static unsigned int
-execute_vrp (void)
+execute_vrp (bool early_pass)
{
int i;
edge e;
switch_update *su;
+ is_early_vrp = early_pass;
+
loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
scev_initialize ();
@@ -9925,6 +9936,23 @@ const pass_data pass_data_vrp =
| TODO_verify_flow ), /* todo_flags_finish */
};
+const pass_data pass_data_early_vrp =
+{
+ GIMPLE_PASS, /* type */
+ "vrp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_TREE_VRP, /* tv_id */
+ PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_cleanup_cfg | TODO_update_ssa
+ | TODO_verify_ssa
+ | TODO_verify_flow ), /* todo_flags_finish */
+};
+
class pass_vrp : public gimple_opt_pass
{
public:
@@ -9935,10 +9963,24 @@ public:
/* opt_pass methods: */
opt_pass * clone () { return new pass_vrp (m_ctxt); }
bool gate () { return gate_vrp (); }
- unsigned int execute () { return execute_vrp (); }
+ unsigned int execute () { return execute_vrp (false); }
}; // class pass_vrp
+class pass_early_vrp : public gimple_opt_pass
+{
+public:
+ pass_early_vrp (gcc::context *ctxt)
+ : gimple_opt_pass (pass_data_early_vrp, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ opt_pass * clone () { return new pass_early_vrp (m_ctxt); }
+ bool gate () { return gate_vrp (); }
+ unsigned int execute () { return execute_vrp (true); }
+
+}; // class pass_early_vrp
+
} // anon namespace
gimple_opt_pass *
@@ -9946,3 +9988,9 @@ make_pass_vrp (gcc::context *ctxt)
{
return new pass_vrp (ctxt);
}
+
+gimple_opt_pass *
+make_pass_early_vrp (gcc::context *ctxt)
+{
+ return new pass_early_vrp (ctxt);
+}