@@ -3507,6 +3507,8 @@ expand_call (tree exp, rtx target, int ignore)
free (stack_usage_map_buf);
+ targetm.post_expand_call_insn (last_call_insn ());
+
return target;
}
@@ -4344,6 +4346,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
free (stack_usage_map_buf);
+ targetm.post_expand_call_insn (last_call_insn ());
+
return value;
}
@@ -1408,6 +1408,11 @@ registers whenever the function being expanded has any SDmode
usage.
@end deftypefn
+@deftypefn {Target Hook} void TARGET_POST_EXPAND_CALL_INSN (rtx)
+This hook is called just after expansion of a call_expr into rtl, allowing
+the target to perform additional processing.
+@end deftypefn
+
@deftypefn {Target Hook} void TARGET_INSTANTIATE_DECLS (void)
This hook allows the backend to perform additional instantiations on rtl
that are not actually in any insns yet, but will be later.
@@ -1285,6 +1285,8 @@ The default definition of this macro returns false for all sizes.
@hook TARGET_EXPAND_TO_RTL_HOOK
+@hook TARGET_POST_EXPAND_CALL_INSN
+
@hook TARGET_INSTANTIATE_DECLS
@hook TARGET_MANGLE_TYPE
@@ -461,6 +461,13 @@ hook_void_rtx_int (rtx insn ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
{
}
+/* Generic hook that takes a rtx and an int and returns void. */
+
+void
+hook_void_rtx (rtx insn ATTRIBUTE_UNUSED)
+{
+}
+
/* Generic hook that takes a struct gcc_options * and returns void. */
void
@@ -66,6 +66,7 @@ extern bool hook_bool_dint_dint_uint_bool_true (double_int, double_int,
extern void hook_void_void (void);
extern void hook_void_constcharptr (const char *);
+extern void hook_void_rtx (rtx);
extern void hook_void_rtx_int (rtx, int);
extern void hook_void_FILEptr_constcharptr (FILE *, const char *);
extern bool hook_bool_FILEptr_rtx_false (FILE *, rtx);
@@ -4639,6 +4639,15 @@ usage.",
hook_void_void)
/* This target hook allows the backend to perform additional
+ processing after expansion of a call insn. */
+DEFHOOK
+(post_expand_call_insn,
+ "This hook is called just after expansion of a call_expr into rtl, allowing\n\
+the target to perform additional processing.",
+ void, (rtx),
+ hook_void_rtx)
+
+/* This target hook allows the backend to perform additional
instantiations on rtx that are not actually in insns yet,
but will be later. */
DEFHOOK