diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-26 17:08:12 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-26 17:08:12 +0000 |
commit | 9628978f9de43546af531730a7c93eca787ba6e9 (patch) | |
tree | 3ba1dafb844c589e276e71d31cb9c17653dce0c5 /gcc/lra.c | |
parent | 6a5947929d528b6dca296759f4097cd354f5e9f1 (diff) | |
download | gcc-9628978f9de43546af531730a7c93eca787ba6e9.tar.gz |
2017-01-26 Vladimir Makarov <vmakarov@redhat.com>
PR target/79131
* lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
endianess for subregs into account.
* lra-constraints.c (lra_constraints): Do risky transformations
always on the first iteration.
* lra-lives.c (check_pseudos_live_through_calls): Add arg
last_call_used_reg_set.
(process_bb_lives): Define and use last_call_used_reg_set.
* lra.c (lra): Always continue after lra_constraints on the first
iteration.
2017-01-26 Vladimir Makarov <vmakarov@redhat.com>
PR target/79131
* gcc.target/arm/pr79131.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/lra.c b/gcc/lra.c index da3b955be36..9be0053f543 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -2295,7 +2295,7 @@ void lra (FILE *f) { int i; - bool live_p, scratch_p, inserted_p; + bool live_p, inserted_p; lra_dump_file = f; @@ -2332,7 +2332,6 @@ lra (FILE *f) lra_constraint_new_regno_start = lra_new_regno_start = max_reg_num (); lra_bad_spill_regno_start = INT_MAX; remove_scratches (); - scratch_p = lra_constraint_new_regno_start != max_reg_num (); /* A function that has a non-local label that can reach the exit block via non-exceptional paths must save all call-saved @@ -2372,11 +2371,12 @@ lra (FILE *f) for (;;) { /* We should try to assign hard registers to scratches even - if there were no RTL transformations in - lra_constraints. */ + if there were no RTL transformations in lra_constraints. + Also we should check IRA assignments on the first + iteration as they can be wrong because of early clobbers + operands which are ignored in IRA. */ if (! lra_constraints (lra_constraint_iter == 0) - && (lra_constraint_iter > 1 - || (! scratch_p && ! caller_save_needed))) + && lra_constraint_iter > 1) break; /* Constraint transformations may result in that eliminable hard regs become uneliminable and pseudos which use them |