diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2019-05-22 00:35:32 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2019-05-22 00:35:32 +0000 |
commit | 5e21e8e70fbb9ae0ec8f6c29daeee0412dc10fbf (patch) | |
tree | 5c1b377d380b18be2781a12353ffa8934f2867a6 /gcc | |
parent | 325437b2a329715da7be4de792af052c19a0ac7b (diff) | |
download | gcc-5e21e8e70fbb9ae0ec8f6c29daeee0412dc10fbf.zip gcc-5e21e8e70fbb9ae0ec8f6c29daeee0412dc10fbf.tar.gz gcc-5e21e8e70fbb9ae0ec8f6c29daeee0412dc10fbf.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ira-lives.c | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c4c215..e5e0fe18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 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 stacked parameter only for STRICT_ALIGNMENT targets. diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index faadf08..581fdd3 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -1241,11 +1241,6 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node) preprocess_constraints (insn); 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) { /* 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) } } + /* 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 (); curr_point++; |