https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109231

--- Comment #30 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, if I add the
--- a/gcc/tree-inline.cc
+++ b/gcc/tree-inline.cc
@@ -2787,6 +2787,7 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl,
profile_count count)
   /* Get clean struct function.  */
   push_struct_function (new_fndecl, true);
   targetm.target_option.relayout_function (new_fndecl);
+  aggregate_value_p (DECL_RESULT (new_fndecl), new_fndecl);

   /* We will rebuild these, so just sanity check that they are empty.  */
   gcc_assert (VALUE_HISTOGRAMS (cfun) == NULL);
I see 5 calls of this in this spot, two with int return type, one with TFmode
floating one, one with uint and one with bool.
aggregate_value_p calls targetm.calls.return_in_memory but I don't see
sparc_return_in_memory to have any side-effects other than return value.
Next it calls reg = hard_function_value (type, 0, fntype, 0); which does
allocate a REG rtx, but doesn't save it anywhere.  It then calls fntype_abi and
hard_regno_nregs
and predefined_function_abi::clobbers_full_reg_p, but I don't see any
side-effects in those either.
Nothing seems to cache its results in any way.

Confused...

Reply via email to