Commit 54bddf1d by Ilya Enkovich Committed by Kirill Yukhin

lra-constraints.c (inherit_in_ebb): Handle calls with multiple return values.


gcc/
	* lra-constraints.c (inherit_in_ebb): Handle calls with
	multiple return values.
	* caller-save.c (save_call_clobbered_regs): Likewise.

From-SVN: r215839
parent f598c55c
2014-10-03 Ilya Enkovich <ilya.enkovich@intel.com>
* lra-constraints.c (inherit_in_ebb): Handle calls with
multiple return values.
* caller-save.c (save_call_clobbered_regs): Likewise.
2014-10-03 Jakub Jelinek <jakub@redhat.com> 2014-10-03 Jakub Jelinek <jakub@redhat.com>
* tree-vect-data-refs.c (vect_permute_load_chain, * tree-vect-data-refs.c (vect_permute_load_chain,
...@@ -879,8 +879,13 @@ save_call_clobbered_regs (void) ...@@ -879,8 +879,13 @@ save_call_clobbered_regs (void)
if (GET_CODE (pat) == PARALLEL) if (GET_CODE (pat) == PARALLEL)
pat = XVECEXP (pat, 0, 0); pat = XVECEXP (pat, 0, 0);
dest = SET_DEST (pat); dest = SET_DEST (pat);
newpat = gen_rtx_SET (VOIDmode, cheap, copy_rtx (dest)); /* For multiple return values dest is PARALLEL.
chain = insert_one_insn (chain, 0, -1, newpat); Currently we handle only single return value case. */
if (REG_P (dest))
{
newpat = gen_rtx_SET (VOIDmode, cheap, copy_rtx (dest));
chain = insert_one_insn (chain, 0, -1, newpat);
}
} }
} }
last = chain; last = chain;
......
...@@ -5348,16 +5348,21 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail) ...@@ -5348,16 +5348,21 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
if (GET_CODE (pat) == PARALLEL) if (GET_CODE (pat) == PARALLEL)
pat = XVECEXP (pat, 0, 0); pat = XVECEXP (pat, 0, 0);
dest = SET_DEST (pat); dest = SET_DEST (pat);
start_sequence (); /* For multiple return values dest is PARALLEL.
emit_move_insn (cheap, copy_rtx (dest)); Currently we handle only single return value case. */
restore = get_insns (); if (REG_P (dest))
end_sequence (); {
lra_process_new_insns (curr_insn, NULL, restore, start_sequence ();
"Inserting call parameter restore"); emit_move_insn (cheap, copy_rtx (dest));
/* We don't need to save/restore of the pseudo from restore = get_insns ();
this call. */ end_sequence ();
usage_insns[regno].calls_num = calls_num; lra_process_new_insns (curr_insn, NULL, restore,
bitmap_set_bit (&check_only_regs, regno); "Inserting call parameter restore");
/* We don't need to save/restore of the pseudo from
this call. */
usage_insns[regno].calls_num = calls_num;
bitmap_set_bit (&check_only_regs, regno);
}
} }
} }
to_inherit_num = 0; to_inherit_num = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment