Commit 5e21e8e7 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

re PR middle-end/90553 (Register allocation allocates post-incremented…

re PR middle-end/90553 (Register allocation allocates post-incremented address-load of call to call-clobbered register)

	PR middle-end/90553
	* ira-lives.c (process_bb_node_lives): Consider defs
	for a call insn to be die before the call, not after.

From-SVN: r271498
parent 325437b2
2019-05-22 Hans-Peter Nilsson <hp@axis.com> 2019-05-22 Hans-Peter Nilsson <hp@axis.com>
PR middle-end/90553
* ira-lives.c (process_bb_node_lives): Consider defs
for a call insn to be die before the call, not after.
* function.c (assign_parm_setup_block): Raise alignment of * function.c (assign_parm_setup_block): Raise alignment of
stacked parameter only for STRICT_ALIGNMENT targets. stacked parameter only for STRICT_ALIGNMENT targets.
......
...@@ -1241,11 +1241,6 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node) ...@@ -1241,11 +1241,6 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
preprocess_constraints (insn); preprocess_constraints (insn);
process_single_reg_class_operands (false, freq); process_single_reg_class_operands (false, freq);
/* See which defined values die here. */
FOR_EACH_INSN_DEF (def, insn)
if (!call_p || !DF_REF_FLAGS_IS_SET (def, DF_REF_MAY_CLOBBER))
mark_ref_dead (def);
if (call_p) if (call_p)
{ {
/* Try to find a SET in the CALL_INSN_FUNCTION_USAGE, and from /* Try to find a SET in the CALL_INSN_FUNCTION_USAGE, and from
...@@ -1309,6 +1304,17 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node) ...@@ -1309,6 +1304,17 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
} }
} }
/* See which defined values die here. Note that we include
the call insn in the lifetimes of these values, so we don't
mistakenly consider, for e.g. an addressing mode with a
side-effect like a post-increment fetching the address,
that the use happens before the call, and the def to happen
after the call: we believe both to happen before the actual
call. (We don't handle return-values here.) */
FOR_EACH_INSN_DEF (def, insn)
if (!call_p || !DF_REF_FLAGS_IS_SET (def, DF_REF_MAY_CLOBBER))
mark_ref_dead (def);
make_early_clobber_and_input_conflicts (); make_early_clobber_and_input_conflicts ();
curr_point++; curr_point++;
......
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