aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEugene Rozenfeld <erozen@microsoft.com>2021-08-02 17:12:04 -0700
committerEugene Rozenfeld <erozen@microsoft.com>2021-08-03 14:25:47 -0700
commitf9ad3d5339faaaed6e15a7b27d90fbc66eb72f37 (patch)
tree66f41e2162aab83c0fafdd1229b84b0b91cee7a0 /gcc
parentaabf07cd5dc314135adde89830a86be157d7596b (diff)
downloadgcc-f9ad3d5339faaaed6e15a7b27d90fbc66eb72f37.zip
gcc-f9ad3d5339faaaed6e15a7b27d90fbc66eb72f37.tar.gz
gcc-f9ad3d5339faaaed6e15a7b27d90fbc66eb72f37.tar.bz2
Fixes for AutoFDO tests
* Changed several tests to use -fdump-ipa-afdo-optimized instead of -fdump-ipa-afdo in dg-options so that the expected output can be found * Increased the number of iterations in several tests so that perf can have enough sampling events Contributes to fixing PR gcov-profile/71672. gcc/testsuite/ChangeLog: * g++.dg/tree-prof/indir-call-prof.C: Fix options, increase the number of iterations. * g++.dg/tree-prof/morefunc.C: Fix options, increase the number of iterations. * g++.dg/tree-prof/reorder.C: Fix options, increase the number of iterations. * gcc.dg/tree-prof/indir-call-prof-2.c: Fix options, increase the number of iterations. * gcc.dg/tree-prof/indir-call-prof.c: Fix options.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C4
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/morefunc.C7
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/reorder.C6
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c2
5 files changed, 11 insertions, 10 deletions
diff --git a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C
index 3374744..b454171 100644
--- a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C
+++ b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile-optimized -fdump-ipa-afdo" } */
+/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile-optimized -fdump-ipa-afdo-optimized" } */
struct A {
A () {}
@@ -26,7 +26,7 @@ main (void)
int i;
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < 10000000; i++)
{
p = (A *)wrap ((void *)&a);
p->AA ();
diff --git a/gcc/testsuite/g++.dg/tree-prof/morefunc.C b/gcc/testsuite/g++.dg/tree-prof/morefunc.C
index 621d09a..96e0073 100644
--- a/gcc/testsuite/g++.dg/tree-prof/morefunc.C
+++ b/gcc/testsuite/g++.dg/tree-prof/morefunc.C
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile-optimized -fdump-ipa-afdo -Wno-attributes -Wno-coverage-mismatch -Wno-missing-profile" } */
+/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile-optimized -fdump-ipa-afdo-optimized -Wno-attributes -Wno-coverage-mismatch -Wno-missing-profile" } */
+
#include "reorder_class1.h"
#include "reorder_class2.h"
@@ -19,7 +20,7 @@ static __attribute__((always_inline))
void test1 (A *tc)
{
int i;
- for (i = 0; i < 1000; i++)
+ for (i = 0; i < 10000000; i++)
g += tc->foo();
if (g<100) g++;
}
@@ -28,7 +29,7 @@ static __attribute__((always_inline))
void test2 (B *tc)
{
int i;
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < 10000000; i++)
g += tc->foo();
}
diff --git a/gcc/testsuite/g++.dg/tree-prof/reorder.C b/gcc/testsuite/g++.dg/tree-prof/reorder.C
index 000fb65..5049096 100644
--- a/gcc/testsuite/g++.dg/tree-prof/reorder.C
+++ b/gcc/testsuite/g++.dg/tree-prof/reorder.C
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile-optimized -fdump-ipa-afdo -Wno-coverage-mismatch -Wno-attributes" } */
+/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile-optimized -fdump-ipa-afdo-optimized -Wno-coverage-mismatch -Wno-attributes" } */
#ifdef _PROFILE_USE
#include "reorder_class1.h"
@@ -13,7 +13,7 @@ static __attribute__((always_inline))
void test1 (A *tc)
{
int i;
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < 10000000; i++)
g += tc->foo();
if (g<100) g++;
}
@@ -22,7 +22,7 @@ static __attribute__((always_inline))
void test2 (B *tc)
{
int i;
- for (i = 0; i < 1000000; i++)
+ for (i = 0; i < 10000000; i++)
g += tc->foo();
}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-2.c b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-2.c
index bbba052..2585326 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-2.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-2.c
@@ -22,7 +22,7 @@ int
main (void)
{
int i, val = 0;
- for (i = 0; i < 100000; i++)
+ for (i = 0; i < 10000000; i++)
{
val = do_op (val, add1);
val = do_op (val, sub1);
diff --git a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c
index 138b85a..7020452 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile-optimized -fdump-ipa-afdo" } */
+/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile-optimized -fdump-ipa-afdo-optimized" } */
static int a1 (void)
{