aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2020-07-21 09:20:36 -0700
committerSandra Loosemore <sandra@codesourcery.com>2020-07-21 09:20:36 -0700
commitdf41897928b4879df9f38a40a0e22659076544c1 (patch)
treeada3d6f7a1ca567816c5df0186936933938986ce /gcc
parent4e1e858cc8fbcbffa978a97ccdffdd2644639598 (diff)
downloadgcc-df41897928b4879df9f38a40a0e22659076544c1.zip
gcc-df41897928b4879df9f38a40a0e22659076544c1.tar.gz
gcc-df41897928b4879df9f38a40a0e22659076544c1.tar.bz2
Scale down long-running tree-prof.exp tests for non-FDO testing.
2020-07-21 Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ * lib/profopt.exp (auto-profopt-execute): Pass -DFOR_AUTOFDO_TESTING on command line for both compiles. * gcc.dg/tree-prof/cold_partition_label.c: Scale down for non-FDO testing. * gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c: Likewise. * gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c: Likewise. * gcc.dg/tree-prof/indir-call-prof-topn.c: Likewise. * gcc.dg/tree-prof/section-attr-1.c: Likewise. * gcc.dg/tree-prof/section-attr-2.c: Likewise. * gcc.dg/tree-prof/section-attr-3.c: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-topn.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c8
-rw-r--r--gcc/testsuite/lib/profopt.exp4
8 files changed, 51 insertions, 9 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
index 450308d..511b610 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
@@ -3,6 +3,12 @@
/* { dg-require-effective-target freorder } */
/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps -fdump-tree-optimized" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 1000000
+#else
+#define MAXITER 10000
+#endif
+
#define SIZE 10000
const char *sarr[SIZE];
@@ -32,7 +38,7 @@ main (int argc, char *argv[])
int i;
buf_hot = "hello";
buf_cold = "world";
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < MAXITER; i++)
foo (argc);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c
index a13b08c..b57d30f 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c
@@ -3,6 +3,12 @@
/* { dg-require-profiling "-fprofile-generate" } */
/* { dg-options "-O2 -flto -DDOJOB=1 -fdump-ipa-profile_estimate" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 350000000
+#else
+#define MAXITER 3500000
+#endif
+
#include <stdio.h>
typedef int (*fptr) (int);
@@ -22,7 +28,7 @@ main()
x = one (3);
- for (i = 0; i < 350000000; i++)
+ for (i = 0; i < MAXITER; i++)
{
x = (*p) (3);
p = table[x];
diff --git a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c
index 9b996fc..6b5ae93 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c
@@ -3,6 +3,12 @@
/* { dg-require-profiling "-fprofile-generate" } */
/* { dg-options "-O2 -flto -DDOJOB=1 -fdump-ipa-profile_estimate" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 350000000
+#else
+#define MAXITER 3500000
+#endif
+
#include <stdio.h>
typedef int (*fptr) (int);
@@ -21,7 +27,7 @@ int foo ()
x = one (3);
- for (i = 0; i < 350000000; i++)
+ for (i = 0; i < MAXITER; i++)
{
x = (*p) (3);
p = table[x];
diff --git a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-topn.c b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-topn.c
index 063996c..9a1a0be 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-topn.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-topn.c
@@ -1,6 +1,12 @@
/* { dg-require-profiling "-fprofile-generate" } */
/* { dg-options "-O2 -fdump-ipa-profile_estimate" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 350000000
+#else
+#define MAXITER 3500000
+#endif
+
#include <stdio.h>
typedef int (*fptr) (int);
@@ -26,7 +32,7 @@ main()
one (3);
- for (i = 0; i < 350000000; i++)
+ for (i = 0; i < MAXITER; i++)
{
x = (*p) (3);
p = table[x];
diff --git a/gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c b/gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c
index 89ecc1c..2087d0d 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/section-attr-1.c
@@ -3,6 +3,12 @@
/* { dg-require-effective-target freorder } */
/* { dg-options "-O2 -fno-profile-reorder-functions -freorder-blocks-and-partition -save-temps" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 1000000
+#else
+#define MAXITER 10000
+#endif
+
#define SIZE 10000
#define NOINLINE __attribute__((noinline)) __attribute__ ((noclone))
@@ -24,7 +30,7 @@ main (int argc, char *argv[])
int i;
buf_hot = "hello";
buf_cold = "world";
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < MAXITER; i++)
foo (argc);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c b/gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c
index b856457..b02526b 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/section-attr-2.c
@@ -4,6 +4,12 @@
/* { dg-require-effective-target freorder } */
/* { dg-options "-O2 -fno-profile-reorder-functions -freorder-blocks-and-partition -save-temps" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 1000000
+#else
+#define MAXITER 10000
+#endif
+
#define SIZE 10000
#define NOINLINE __attribute__((noinline)) __attribute__ ((noclone))
@@ -20,7 +26,7 @@ main (int argc, char *argv[])
int i;
buf_hot = "hello";
buf_cold = "world";
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < MAXITER; i++)
foo (argc);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c b/gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c
index 8d85cf3..da06407 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c
@@ -4,6 +4,12 @@
/* { dg-require-effective-target freorder } */
/* { dg-options "-O2 -fno-profile-reorder-functions -freorder-blocks-and-partition -save-temps" } */
+#ifdef FOR_AUTOFDO_TESTING
+#define MAXITER 1000000
+#else
+#define MAXITER 10000
+#endif
+
#define SIZE 10000
#define NOINLINE __attribute__((noinline)) __attribute__ ((noclone))
@@ -24,7 +30,7 @@ main (int argc, char *argv[])
int i;
buf_hot = "hello";
buf_cold = "world";
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < MAXITER; i++)
foo (argc);
return 0;
}
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp
index af1fd62..d686343 100644
--- a/gcc/testsuite/lib/profopt.exp
+++ b/gcc/testsuite/lib/profopt.exp
@@ -289,8 +289,8 @@ proc auto-profopt-execute { src } {
return
}
set profile_wrapper [profopt-perf-wrapper]
- set profile_option "-g"
- set feedback_option "-fauto-profile"
+ set profile_option "-g -DFOR_AUTOFDO_TESTING"
+ set feedback_option "-fauto-profile -DFOR_AUTOFDO_TESTING"
set run_autofdo 1
profopt-execute $src
unset profile_wrapper