diff options
author | Martin Liska <mliska@suse.cz> | 2016-08-10 15:11:42 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-08-10 13:11:42 +0000 |
commit | 22063dbc90d0eb8a7cc7939e0941899f90b403db (patch) | |
tree | bca16f60942cfafd651fca3cbf08a464365e76b9 /gcc/gcov-io.h | |
parent | 5a39e998c8a89b26a74b9fb0b5bc17fa8b55d274 (diff) | |
download | gcc-22063dbc90d0eb8a7cc7939e0941899f90b403db.tar.gz |
Cherry-pick fprofile-generate-atomic from google/gcc-4_9
Cherry picked (and modified) from google-4_7 branch
2012-12-26 Rong Xu <xur@google.com>
* common.opt (fprofile-update): Add new flag.
* coretypes.h: Define enum profile_update.
* doc/invoke.texi: Document -fprofile-update.
* gcov-io.h: Declare GCOV_TYPE_ATOMIC_FETCH_ADD and
GCOV_TYPE_ATOMIC_FETCH_ADD_FN.
* tree-profile.c (gimple_init_edge_profiler): Generate
also atomic profiler update.
(gimple_gen_edge_profiler): Likewise.
* g++.dg/gcov/gcov-threads-1.C: New test.
From-SVN: r239323
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r-- | gcc/gcov-io.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index bbf013aa21a..afd00acb866 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -164,6 +164,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef GCC_GCOV_IO_H #define GCC_GCOV_IO_H +#if LONG_LONG_TYPE_SIZE > 32 +#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_8 +#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_8 +#else +#define GCOV_TYPE_ATOMIC_FETCH_ADD_FN __atomic_fetch_add_4 +#define GCOV_TYPE_ATOMIC_FETCH_ADD BUILT_IN_ATOMIC_FETCH_ADD_4 +#endif + #ifndef IN_LIBGCOV /* About the host */ |