]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add call_fusage_contains_non_callee_clobbers hook
authorRadovan Obradovic <robradovic@mips.com>
Mon, 5 May 2014 22:51:36 +0000 (22:51 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 5 May 2014 22:51:36 +0000 (22:51 +0000)
2014-05-05  Radovan Obradovic  <robradovic@mips.com>
            Tom de Vries  <tom@codesourcery.com>

* target.def (call_fusage_contains_non_callee_clobbers): New DEFHOOKPOD.
* doc/tm.texi.in (@node Stack and Calling): Add Miscellaneous Register
Hooks to @menu.
(@node Miscellaneous Register Hooks): New node.
(@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS): New hook.
* doc/tm.texi: Regenerate.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r210085

gcc/ChangeLog
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/target.def

index 74aa6785005b463e4328cfbd0711ce7555e96503..0a5bd037420479d69cee8a4668eb2c3a254485a7 100644 (file)
@@ -1,3 +1,13 @@
+2014-05-05  Radovan Obradovic  <robradovic@mips.com>
+            Tom de Vries  <tom@codesourcery.com>
+
+       * target.def (call_fusage_contains_non_callee_clobbers): New DEFHOOKPOD.
+       * doc/tm.texi.in (@node Stack and Calling): Add Miscellaneous Register
+       Hooks to @menu.
+       (@node Miscellaneous Register Hooks): New node.
+       (@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS): New hook.
+       * doc/tm.texi: Regenerate.
+
 2014-05-05  Marek Polacek  <polacek@redhat.com>
 
        PR driver/61065
index cdc272e0254bba59a043413a1cf153848be3b9c4..4eed4511b60555588b49ae11e54fffd8aa5baf27 100644 (file)
@@ -3091,6 +3091,7 @@ This describes the stack layout and calling conventions.
 * Profiling::
 * Tail Calls::
 * Stack Smashing Protection::
+* Miscellaneous Register Hooks::
 @end menu
 
 @node Frame Layout
@@ -5020,6 +5021,21 @@ normally defined in @file{libgcc2.c}.
 Whether this target supports splitting the stack when the options described in @var{opts} have been passed.  This is called after options have been parsed, so the target may reject splitting the stack in some configurations.  The default version of this hook returns false.  If @var{report} is true, this function may issue a warning or error; if @var{report} is false, it must simply return a value
 @end deftypefn
 
+@node Miscellaneous Register Hooks
+@subsection Miscellaneous register hooks
+@cindex miscellaneous register hooks
+
+@deftypevr {Target Hook} bool TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
+set to true if all the calls in the current function contain clobbers in
+CALL_INSN_FUNCTION_USAGE for the registers that are clobbered by the call
+rather than by the callee, and are not already set or clobbered in the call
+pattern.  Examples of such registers are registers used in PLTs and stubs,
+and temporary registers used in the call instruction but not present in the
+rtl pattern.  Another way to formulate it is the registers not present in the
+rtl pattern that are clobbered by the call assuming the callee does not
+clobber any register.  The default version of this hook is set to false.
+@end deftypevr
+
 @node Varargs
 @section Implementing the Varargs Macros
 @cindex varargs implementation
index efd49639848c85274332df2be385dd2f6b2b2fc2..3c59714a862eb5da280c1e41faec07b95179b57d 100644 (file)
@@ -2720,6 +2720,7 @@ This describes the stack layout and calling conventions.
 * Profiling::
 * Tail Calls::
 * Stack Smashing Protection::
+* Miscellaneous Register Hooks::
 @end menu
 
 @node Frame Layout
@@ -3987,6 +3988,12 @@ the function prologue.  Normally, the profiling code comes after.
 
 @hook TARGET_SUPPORTS_SPLIT_STACK
 
+@node Miscellaneous Register Hooks
+@subsection Miscellaneous register hooks
+@cindex miscellaneous register hooks
+
+@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
+
 @node Varargs
 @section Implementing the Varargs Macros
 @cindex varargs implementation
index 793f12ddfe1a1194d1a69d7c28647c4901324db5..7e0c96e472c12331ddc82e6b6be22c57db011960 100644 (file)
@@ -5142,6 +5142,22 @@ FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, and the PIC_OFFSET_TABLE_REGNUM.",
  void, (bitmap regs),
  hook_void_bitmap)
 
+/* Targets should define this target hook to mark that non-callee clobbers are
+   present in CALL_INSN_FUNCTION_USAGE for all the calls in the current
+   function.  */
+DEFHOOKPOD
+(call_fusage_contains_non_callee_clobbers,
+ "set to true if all the calls in the current function contain clobbers in\n\
+CALL_INSN_FUNCTION_USAGE for the registers that are clobbered by the call\n\
+rather than by the callee, and are not already set or clobbered in the call\n\
+pattern.  Examples of such registers are registers used in PLTs and stubs,\n\
+and temporary registers used in the call instruction but not present in the\n\
+rtl pattern.  Another way to formulate it is the registers not present in the\n\
+rtl pattern that are clobbered by the call assuming the callee does not\n\
+clobber any register.  The default version of this hook is set to false.",
+ bool, 
+ false)
+
 /* Fill in additional registers set up by prologue into a regset.  */
 DEFHOOK
 (set_up_by_prologue,