aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2012-05-09 07:10:45 +0000
committerDehao Chen <dehao@gcc.gnu.org>2012-05-09 07:10:45 +0000
commit99b113f9789e6fd7aa0f7fe1cc7cccc22d7d2fc1 (patch)
tree0a2f8163e3c7cf2990cd62e6491aab158640cc42 /gcc
parent0d6bf48c3ea3b48f462be944e46ced4bf3f08884 (diff)
downloadgcc-99b113f9789e6fd7aa0f7fe1cc7cccc22d7d2fc1.zip
gcc-99b113f9789e6fd7aa0f7fe1cc7cccc22d7d2fc1.tar.gz
gcc-99b113f9789e6fd7aa0f7fe1cc7cccc22d7d2fc1.tar.bz2
predict-1.c: Remove the replicated text in this test.
gcc/testsuite * gcc.dg/predict-1.c: Remove the replicated text in this test. * gcc.dg/predict-2.c: Likewise. * gcc.dg/predict-3.c: Likewise. * gcc.dg/predict-4.c: Likewise. * gcc.dg/predict-5.c: Likewise. * gcc.dg/predict-6.c: Likewise. From-SVN: r187315
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.dg/predict-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/predict-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/predict-3.c25
-rw-r--r--gcc/testsuite/gcc.dg/predict-4.c19
-rw-r--r--gcc/testsuite/gcc.dg/predict-5.c25
-rw-r--r--gcc/testsuite/gcc.dg/predict-6.c25
8 files changed, 16 insertions, 155 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4d154702..77f56a5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -136,15 +136,15 @@
2012-05-08 Dehao Chen <dehao@google.com>
- * predict.c (find_qualified_ssa_name): New
- (find_ssa_name_in_expr): New
- (find_ssa_name_in_assign_stmt): New
- (is_comparison_with_loop_invariant_p): New
- (is_bound_expr_similar): New
- (predict_iv_comparison): New
+ * predict.c (find_qualified_ssa_name): New.
+ (find_ssa_name_in_expr): New.
+ (find_ssa_name_in_assign_stmt): New.
+ (is_comparison_with_loop_invariant_p): New.
+ (is_bound_expr_similar): New.
+ (predict_iv_comparison): New.
(predict_loops): Add heuristic for loop-nested branches that compare an
induction variable to a loop bound variable.
- * predict.def (PRED_LOOP_IV_COMPARE): New macro
+ * predict.def (PRED_LOOP_IV_COMPARE): New macro.
2012-05-08 Uros Bizjak <ubizjak@gmail.com>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 88e4cc8..5a09dc1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-09 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/predict-1.c: Remove the replicated text in this test.
+ * gcc.dg/predict-2.c: Likewise.
+ * gcc.dg/predict-3.c: Likewise.
+ * gcc.dg/predict-4.c: Likewise.
+ * gcc.dg/predict-5.c: Likewise.
+ * gcc.dg/predict-6.c: Likewise.
+
2012-05-08 Hans-Peter Nilsson <hp@axis.com>
PR target/53272
diff --git a/gcc/testsuite/gcc.dg/predict-1.c b/gcc/testsuite/gcc.dg/predict-1.c
index e7f4618..5c9a5a9 100644
--- a/gcc/testsuite/gcc.dg/predict-1.c
+++ b/gcc/testsuite/gcc.dg/predict-1.c
@@ -25,30 +25,3 @@ void foo (int bound)
/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 5 "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
-
-extern int global;
-
-int bar(int);
-
-void foo (int bound)
-{
- int i, ret = 0;
- for (i = 0; i < bound; i++)
- {
- if (i > bound)
- global += bar (i);
- if (i >= bound + 2)
- global += bar (i);
- if (i > bound - 2)
- global += bar (i);
- if (i + 2 > bound)
- global += bar (i);
- if (i == 10)
- global += bar (i);
- }
-}
-
-/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 5 "profile_estimate"} } */
-/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-2.c b/gcc/testsuite/gcc.dg/predict-2.c
index 44895b7..55ca1d0 100644
--- a/gcc/testsuite/gcc.dg/predict-2.c
+++ b/gcc/testsuite/gcc.dg/predict-2.c
@@ -25,30 +25,3 @@ void foo (int base, int bound)
/* { dg-final { scan-tree-dump-not "loop iv compare heuristics" "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
-
-extern int global;
-
-int bar(int);
-
-void foo (int base, int bound)
-{
- int i, ret = 0;
- for (i = base; i < bound; i++)
- {
- if (i > bound * bound)
- global += bar (i);
- if (i > bound + 10)
- global += bar (i);
- if (i <= bound + 10)
- global += bar (i);
- if (i > base + 10)
- global += bar (i);
- if (i < base - 10)
- global += bar (i);
- }
-}
-
-/* { dg-final { scan-tree-dump-not "loop iv compare heuristics" "profile_estimate"} } */
-/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-3.c b/gcc/testsuite/gcc.dg/predict-3.c
index afaf540..8881bde 100644
--- a/gcc/testsuite/gcc.dg/predict-3.c
+++ b/gcc/testsuite/gcc.dg/predict-3.c
@@ -23,28 +23,3 @@ void foo (int bound)
/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
-
-extern int global;
-
-int bar(int);
-
-void foo (int bound)
-{
- int i, ret = 0;
- for (i = 0; i <= bound; i++)
- {
- if (i < bound - 2)
- global += bar (i);
- if (i <= bound)
- global += bar (i);
- if (i + 1 < bound)
- global += bar (i);
- if (i != bound)
- global += bar (i);
- }
-}
-
-/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */
-/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-4.c b/gcc/testsuite/gcc.dg/predict-4.c
index f575b98..17a50b9 100644
--- a/gcc/testsuite/gcc.dg/predict-4.c
+++ b/gcc/testsuite/gcc.dg/predict-4.c
@@ -17,22 +17,3 @@ void foo (int bound)
/* { dg-final { scan-tree-dump "loop iv compare heuristics: 50.0%" "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
-
-extern int global;
-
-int bar(int);
-
-void foo (int bound)
-{
- int i, ret = 0;
- for (i = 0; i < 10; i++)
- {
- if (i < 5)
- global += bar (i);
- }
-}
-
-/* { dg-final { scan-tree-dump "loop iv compare heuristics: 50.0%" "profile_estimate"} } */
-/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-5.c b/gcc/testsuite/gcc.dg/predict-5.c
index f6e70d3..f2fe339 100644
--- a/gcc/testsuite/gcc.dg/predict-5.c
+++ b/gcc/testsuite/gcc.dg/predict-5.c
@@ -23,28 +23,3 @@ void foo (int base, int bound)
/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
-
-extern int global;
-
-int bar (int);
-
-void foo (int base, int bound)
-{
- int i, ret = 0;
- for (i = base; i <= bound; i++)
- {
- if (i > base)
- global += bar (i);
- if (i > base + 1)
- global += bar (i);
- if (i >= base + 3)
- global += bar (i);
- if (i - 2 >= base)
- global += bar (i);
- }
-}
-
-/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */
-/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-6.c b/gcc/testsuite/gcc.dg/predict-6.c
index 552fd07..bf769fd 100644
--- a/gcc/testsuite/gcc.dg/predict-6.c
+++ b/gcc/testsuite/gcc.dg/predict-6.c
@@ -23,28 +23,3 @@ void foo (int base, int bound)
/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 4 "profile_estimate"} } */
/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
-
-extern int global;
-
-int bar (int);
-
-void foo (int base, int bound)
-{
- int i, ret = 0;
- for (i = base; i <= bound; i++)
- {
- if (i < base)
- global += bar (i);
- if (i < base + 1)
- global += bar (i);
- if (i <= base + 3)
- global += bar (i);
- if (i - 1 < base)
- global += bar (i);
- }
-}
-
-/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 4 "profile_estimate"} } */
-/* { dg-final { cleanup-tree-dump "profile_estimate" } } */