Cherry-pick fprofile-generate-atomic from google/gcc-4_9
commit7132b7551ee4b4305f440e633bcd3fda396927b5
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Aug 2016 13:11:42 +0000 (10 13:11 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Aug 2016 13:11:42 +0000 (10 13:11 +0000)
treebca16f60942cfafd651fca3cbf08a464365e76b9
parent3a749c27ebf50edfc0be5294d96d76bf5a3f776c
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239323 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/common.opt
gcc/coretypes.h
gcc/doc/invoke.texi
gcc/gcov-io.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/gcov/gcov-threads-1.C [new file with mode: 0644]
gcc/tree-profile.c