diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2014-05-05 07:55:26 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2014-05-05 07:55:26 +0000 |
commit | d56a43a0e09598ec8e4e76817e5cd0f76e564962 (patch) | |
tree | 17925abdca6968e0293ace7cac7077c037baa800 /gcc/config | |
parent | f668cd6f2be34526a20dcedff00cac876c6760c6 (diff) | |
download | gcc-d56a43a0e09598ec8e4e76817e5cd0f76e564962.zip gcc-d56a43a0e09598ec8e4e76817e5cd0f76e564962.tar.gz gcc-d56a43a0e09598ec8e4e76817e5cd0f76e564962.tar.bz2 |
target.def: Add new target hook.
2014-05-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* 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 <Andreas.Krebbel@de.ibm.com>
* gcc.target/s390/leaf-profile.c: New testcase.
From-SVN: r210061
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/s390/s390.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index cc8f32e..557f0db 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -10160,6 +10160,14 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, return const0_rtx; } +/* We call mcount before the function prologue. So a profiled leaf + function should stay a leaf function. */ + +static bool +s390_keep_leaf_when_profiled () +{ + return true; +} /* Output assembly code for the trampoline template to stdio stream FILE. @@ -12163,6 +12171,9 @@ s390_option_override (void) #undef TARGET_LIBCALL_VALUE #define TARGET_LIBCALL_VALUE s390_libcall_value +#undef TARGET_KEEP_LEAF_WHEN_PROFILED +#define TARGET_KEEP_LEAF_WHEN_PROFILED s390_keep_leaf_when_profiled + #undef TARGET_FIXED_CONDITION_CODE_REGS #define TARGET_FIXED_CONDITION_CODE_REGS s390_fixed_condition_code_regs |