From 27624b9e21febe7d4842b2916aa23965a98ad3fa Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Mon, 21 Apr 2008 23:35:47 +0000 Subject: [PATCH] coverage.c: Include tree-pass.h. * coverage.c: Include tree-pass.h. (coverage_counter_alloc): Print da_file_name to the dump file. testsuite/ * gcc.dg/profile-dir-1.c, gcc.dg/profile-dir-2.c, gcc.dg/profile-dir-3.c: Generate tree_profile dump. Check gcda file name there instead of the assembly. Cleanup tree_profile dump file. From-SVN: r134541 --- gcc/ChangeLog | 14 +++++++++----- gcc/coverage.c | 4 ++++ gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.dg/profile-dir-1.c | 5 +++-- gcc/testsuite/gcc.dg/profile-dir-2.c | 5 +++-- gcc/testsuite/gcc.dg/profile-dir-3.c | 5 +++-- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b6363a613f..e7fc5ef03e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,15 @@ -2008-04-24 Kenneth Zadeck +2008-04-21 Adam Nemet + + * coverage.c: Include tree-pass.h. + (coverage_counter_alloc): Print da_file_name to the dump file. + +2008-04-21 Kenneth Zadeck + * sbitmap.c (sbitmap_range_empty_p): New function. * sbitmap.h (sbitmap_range_empty_p): New function. - * bitmap.h: Now includes obstack.h. + * bitmap.h: Now includes obstack.h. - -2008-04-24 Richard Sandiford +2008-04-21 Richard Sandiford Kenneth Zadeck * dbgcnt.def (ra_byte_scan): Added. @@ -73,7 +78,6 @@ (rtl_opt_pass pass_fast_rtl_byte_dce): New pass. * Makefile.in (df-byte-scan.o, debugcnt.o): Added dependencies. - 2008-04-21 Daniel Franke PR fortran/35019 diff --git a/gcc/coverage.c b/gcc/coverage.c index cd1c13e2d57..ec8d589539f 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see #include "hashtab.h" #include "tree-iterator.h" #include "cgraph.h" +#include "tree-pass.h" #include "gcov-io.c" @@ -421,6 +422,9 @@ coverage_counter_alloc (unsigned counter, unsigned num) ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1); DECL_NAME (tree_ctr_tables[counter]) = get_identifier (buf); DECL_ALIGN (tree_ctr_tables[counter]) = TYPE_ALIGN (gcov_type_node); + + if (dump_file) + fprintf (dump_file, "Using data file %s\n", da_file_name); } fn_b_ctrs[counter] = fn_n_ctrs[counter]; fn_n_ctrs[counter] += num; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 37f4826bb22..4a86a03acaf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-04-21 Adam Nemet + + * gcc.dg/profile-dir-1.c, gcc.dg/profile-dir-2.c, + gcc.dg/profile-dir-3.c: Generate tree_profile dump. Check gcda + file name there instead of the assembly. Cleanup tree_profile + dump file. + 2008-04-21 Steve Ellcey * gcc.dg/vect/vect-vfa-slp.c: XFAIL if vect_no_align. diff --git a/gcc/testsuite/gcc.dg/profile-dir-1.c b/gcc/testsuite/gcc.dg/profile-dir-1.c index 78fbcb20eb5..a0a22ffb0b0 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-1.c +++ b/gcc/testsuite/gcc.dg/profile-dir-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -fprofile-generate=." } */ -/* { dg-final { scan-assembler "\"./profile-dir-1.gcda\"" } } */ +/* { dg-options "-O -fprofile-generate=. -fdump-tree-tree_profile" } */ +/* { dg-final { scan-tree-dump " ./profile-dir-1.gcda" "tree_profile" } } */ int main(void) @@ -9,3 +9,4 @@ main(void) } /* { dg-final { cleanup-coverage-files } } */ +/* { dg-final { cleanup-tree-dump "tree_profile" } } */ diff --git a/gcc/testsuite/gcc.dg/profile-dir-2.c b/gcc/testsuite/gcc.dg/profile-dir-2.c index af55b36a400..454f0641aa2 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-2.c +++ b/gcc/testsuite/gcc.dg/profile-dir-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -fprofile-generate" } */ -/* { dg-final { scan-assembler "/profile-dir-2.gcda" } } */ +/* { dg-options "-O -fprofile-generate -fdump-tree-tree_profile" } */ +/* { dg-final { scan-tree-dump "/profile-dir-2.gcda" "tree_profile" } } */ int main(void) @@ -9,3 +9,4 @@ main(void) } /* { dg-final { cleanup-coverage-files } } */ +/* { dg-final { cleanup-tree-dump "tree_profile" } } */ diff --git a/gcc/testsuite/gcc.dg/profile-dir-3.c b/gcc/testsuite/gcc.dg/profile-dir-3.c index 0a924e97251..29b0a558712 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-3.c +++ b/gcc/testsuite/gcc.dg/profile-dir-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -fprofile-generate -fprofile-dir=." } */ -/* { dg-final { scan-assembler "\"./profile-dir-3.gcda\"" } } */ +/* { dg-options "-O -fprofile-generate -fprofile-dir=. -fdump-tree-tree_profile" } */ +/* { dg-final { scan-tree-dump " ./profile-dir-3.gcda" "tree_profile" } } */ int main(void) @@ -9,3 +9,4 @@ main(void) } /* { dg-final { cleanup-coverage-files } } */ +/* { dg-final { cleanup-tree-dump "tree_profile" } } */ -- 2.30.2