diff options
author | Yiran Wang <yiran@google.com> | 2015-06-23 15:33:17 -0700 |
---|---|---|
committer | Yiran Wang <yiran@google.com> | 2015-06-29 10:56:28 -0700 |
commit | 1d9fec7937f45dde5e04cac966a2d9a12f2fc15a (patch) | |
tree | 3fbcd18a379a05fd6d43491a107e1f36bc61b185 /gcc-4.9/gcc/testsuite/gcc.dg/tree-prof | |
parent | f378ebf14df0952eae870c9865bab8326aa8f137 (diff) | |
download | toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.zip toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.gz toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.bz2 |
Synchronize with google/gcc-4_9 to r224707 (from r214835)
Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/tree-prof')
7 files changed, 44 insertions, 5 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c index a03aad7..643707f 100644 --- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c @@ -35,4 +35,6 @@ main (int argc, char *argv[]) return 0; } +/* { dg-final-use { scan-assembler "foo\[._\]+cold\[\._\]+0" } } */ +/* { dg-final-use { scan-assembler "size\[ \ta-zA-Z0-0\]+foo\[._\]+cold\[\._\]+0" } } */ /* { dg-final-use { cleanup-saved-temps } } */ diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_patch.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_patch.c new file mode 100644 index 0000000..fe86963 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/cold_partition_patch.c @@ -0,0 +1,37 @@ +/* Check if patching works with function splitting. */ +/* { dg-require-effective-target freorder } */ +/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps " { target { ! x86_64-*-* } } } +/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps -mpatch-functions-for-instrumentation -fno-optimize-sibling-calls " { target x86_64-*-* } } */ +#define SIZE 10000 + +const char *sarr[SIZE]; +const char *buf_hot; +const char *buf_cold; + +__attribute__((noinline)) +void +foo (int path) +{ + int i; + if (path) + { + for (i = 0; i < SIZE; i++) + sarr[i] = buf_hot; + } + else + { + for (i = 0; i < SIZE; i++) + sarr[i] = buf_cold; + } +} + +int +main (int argc, char *argv[]) +{ + buf_hot = "hello"; + buf_cold = "world"; + foo (argc); + return 0; +} + +/* { dg-final-use { cleanup-saved-temps } } */ diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c index ff103a8..a5aeffb 100644 --- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-ipa-profile --param=lipo-sampling-period=1" } */ extern void callee (void); extern void caller (void (*func) (void)); diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof-single_0.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof-single_0.c index 29a216c..8d78bb5 100644 --- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof-single_0.c +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof-single_0.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile --param=lipo-sampling-period=1" } */ static int a1 (void) { diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c index 6bd048d..3b681b2 100644 --- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile --param=lipo-sampling-period=3" } */ extern void setp (int (**pp) (void), int i); diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c index c61b534..b61045b 100644 --- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-ipa-profile --param=profile-values-time=1" } */ __attribute__ ((noinline)) int foo() diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c index 0411341..2f65d4e 100644 --- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-ipa-profile --param=profile-values-time=1" } */ #include <unistd.h> |