diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2004-04-24 00:50:16 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2004-04-23 22:50:16 +0000 |
commit | d1c38823924506d389ca58d02926ace21bdf82fa (patch) | |
tree | 8f9b0102376621d66e7cba56d6bc27986f106252 /gcc/calls.c | |
parent | adabbcf475e259e77ef3b3d94f2070327955ee0a (diff) | |
download | gcc-d1c38823924506d389ca58d02926ace21bdf82fa.zip gcc-d1c38823924506d389ca58d02926ace21bdf82fa.tar.gz gcc-d1c38823924506d389ca58d02926ace21bdf82fa.tar.bz2 |
Makefile.in (LIBGCOV): Add _gcov_fork...
* Makefile.in (LIBGCOV): Add _gcov_fork, _gcov_execl, _gcov_execlp,
_gcov_execle, _gcov_execv, _gcov_execvp, _gcov_execve.
* builtin-types.def (BT_PID, BT_PTR_CONST_STRING, BT_FN_PID,
BT_FN_INT_CONST_STRING_PTR_CONST_STRING,
BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING): New.
* builtins.c (expand_builtin_fork_or_exec): New.
(expand_builtin): Call it.
* builtins.def (BUILT_IN_EXECL, BUILT_IN_EXECLP,BUILT_IN_EXECLE,
BUILT_IN_EXECV, BUILT_IN_EXECVP, BUILT_IN_EXECVE, BUILT_IN_FORK): New.
* c-common.c (PID_TYPE): New macro.
(c_common_nodes_and_builtins): Initialize pid_type_node.
* calls.c (special_function_p): Do not handle fork and exec.
(expand_call): Do not handle ECF_FORK_OR_EXEC.
* gcov-io.h (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle,
__gcov_execv, __gcov_execvp, __gcov_execve): Declare.
* libgcov.c (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle,
__gcov_execv, __gcov_execvp, __gcov_execve): New.
* tree.h (enum tree_index): Add TI_PID_TYPE.
(pid_type_node): New macro.
(ECF_FORK_OR_EXEC): Removed.
From-SVN: r81118
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 44d6360..091ea4e 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -653,21 +653,8 @@ special_function_p (tree fndecl, int flags) else if (tname[0] == 'l' && tname[1] == 'o' && ! strcmp (tname, "longjmp")) flags |= ECF_LONGJMP; - - else if ((tname[0] == 'f' && tname[1] == 'o' - && ! strcmp (tname, "fork")) - /* Linux specific: __clone. check NAME to insist on the - leading underscores, to avoid polluting the ISO / POSIX - namespace. */ - || (name[0] == '_' && name[1] == '_' - && ! strcmp (tname, "clone")) - || (tname[0] == 'e' && tname[1] == 'x' && tname[2] == 'e' - && tname[3] == 'c' && (tname[4] == 'l' || tname[4] == 'v') - && (tname[5] == '\0' - || ((tname[5] == 'p' || tname[5] == 'e') - && tname[6] == '\0')))) - flags |= ECF_FORK_OR_EXEC; } + return flags; } @@ -2626,18 +2613,6 @@ expand_call (tree exp, rtx target, int ignore) stack_pointer_delta = save_stack_pointer_delta; } - if (profile_arc_flag && (flags & ECF_FORK_OR_EXEC)) - { - /* A fork duplicates the profile information, and an exec discards - it. We can't rely on fork/exec to be paired. So write out the - profile information we have gathered so far, and clear it. */ - /* ??? When Linux's __clone is called with CLONE_VM set, profiling - is subject to race conditions, just as with multithreaded - programs. */ - - emit_library_call (gcov_flush_libfunc, LCT_ALWAYS_RETURN, VOIDmode, 0); - } - /* Ensure current function's preferred stack boundary is at least what we need. We don't have to increase alignment for recursive functions. */ |