From 0ac109b5a135aeac95b2ad42e7fbbd241197a931 Mon Sep 17 00:00:00 2001 From: krebbel Date: Mon, 5 May 2014 07:55:26 +0000 Subject: 2014-05-05 Andreas Krebbel * target.def: Add new target hook. * doc/tm.texi: Regenerate. * targhooks.h (default_keep_leaf_when_profiled): Add prototype. * targhooks.c (default_keep_leaf_when_profiled): New function. * config/s390/s390.c (s390_keep_leaf_when_profiled): New function. (TARGET_KEEP_LEAF_WHEN_PROFILED): Define. 2014-05-05 Andreas Krebbel * gcc.target/s390/leaf-profile.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210061 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/doc/tm.texi | 4 ++++ gcc/doc/tm.texi.in | 2 ++ 2 files changed, 6 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index ed35bcb2351..cdc272e0254 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4953,6 +4953,10 @@ Define this macro if the code for function profiling should come before the function prologue. Normally, the profiling code comes after. @end defmac +@deftypefn {Target Hook} bool TARGET_KEEP_LEAF_WHEN_PROFILED (void) +This target hook returns true if the target wants the leaf flag for the current function to stay true even if it calls mcount. This might make sense for targets using the leaf flag only to determine whether a stack frame needs to be generated or not and for which the call to mcount is generated before the function prologue. +@end deftypefn + @node Tail Calls @subsection Permitting tail calls @cindex tail calls diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index a5c37417927..efd49639848 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -3963,6 +3963,8 @@ Define this macro if the code for function profiling should come before the function prologue. Normally, the profiling code comes after. @end defmac +@hook TARGET_KEEP_LEAF_WHEN_PROFILED + @node Tail Calls @subsection Permitting tail calls @cindex tail calls -- cgit v1.2.1