aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2015-09-01 19:37:52 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2015-09-01 19:37:52 +0000
commit3363daad0cbf860eebb516030084723ce73eb1e5 (patch)
tree2d86073d67af59894d4756cb8103bb1ed6470ca9 /gcc/lra-constraints.c
parentaef90c1d3dd67054bf1f0ca854b14dcdef5745b8 (diff)
downloadgcc-3363daad0cbf860eebb516030084723ce73eb1e5.zip
gcc-3363daad0cbf860eebb516030084723ce73eb1e5.tar.gz
gcc-3363daad0cbf860eebb516030084723ce73eb1e5.tar.bz2
re PR target/61578 (Code size increase for ARM thumb compared to 4.8.x when compiling with -Os)
2015-09-01 Vladimir Makarov <vmakarov@redhat.com> PR target/61578 * lra-lives.c (process_bb_lives): Process move pseudos with the same value for copies and preferences * lra-constraints.c (match_reload): Create match reload pseudo with the same value from single dying input pseudo. From-SVN: r227382
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index ddb91dd..cdb2695 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -928,10 +928,12 @@ match_reload (signed char out, signed char *ins, enum reg_class goal_class,
they live in the same place. When we create a pseudo we
assign value of original pseudo (if any) from which we
created the new pseudo. If we create the pseudo from the
- input pseudo, the new pseudo will no conflict with the input
- pseudo which is wrong when the input pseudo lives after the
- insn and as the new pseudo value is changed by the insn
- output. Therefore we create the new pseudo from the output.
+ input pseudo, the new pseudo will have no conflict with the
+ input pseudo which is wrong when the input pseudo lives after
+ the insn and as the new pseudo value is changed by the insn
+ output. Therefore we create the new pseudo from the output
+ except the case when we have single matched dying input
+ pseudo.
We cannot reuse the current output register because we might
have a situation like "a <- a op b", where the constraints
@@ -940,8 +942,12 @@ match_reload (signed char out, signed char *ins, enum reg_class goal_class,
so that it doesn't clobber the current value of "a". */
new_in_reg = new_out_reg
- = lra_create_new_reg_with_unique_value (outmode, out_rtx,
- goal_class, "");
+ = (ins[1] < 0 && REG_P (in_rtx)
+ && (int) REGNO (in_rtx) < lra_new_regno_start
+ && find_regno_note (curr_insn, REG_DEAD, REGNO (in_rtx))
+ ? lra_create_new_reg (inmode, in_rtx, goal_class, "")
+ : lra_create_new_reg_with_unique_value (outmode, out_rtx,
+ goal_class, ""));
}
/* In operand can be got from transformations before processing insn
constraints. One example of such transformations is subreg