From: Vladimir Makarov Date: Fri, 24 Mar 2017 18:47:38 +0000 (+0000) Subject: re PR target/80148 (operand has impossible constraints) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdcfea63c65d56c2af9beb603b338a35ea854383;p=gcc.git re PR target/80148 (operand has impossible constraints) 2017-03-24 Vladimir Makarov PR target/80148 * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos to consider in curr_insn_transform. From-SVN: r246467 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f82afbe9ab4..adf3791dfd9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-24 Vladimir Makarov + + PR target/80148 + * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos + to consider in curr_insn_transform. + 2017-03-24 Jakub Jelinek * genrecog.c (validate_pattern): Add VEC_SELECT validation. diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 226601bf2e6..75bb630dca7 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -1507,6 +1507,14 @@ assign_by_spills (void) sorted_pseudos[nfails++] = conflict_regno; former_reload_pseudo_spill_p = true; } + else + /* It is better to do reloads before spilling as after the + spill-subpass we will reload memory instead of pseudos + and this will make reusing reload pseudos more + complicated. Going directly to the spill pass in such + case might result in worse code performance or even LRA + cycling if we have few registers. */ + bitmap_set_bit (&all_spilled_pseudos, conflict_regno); if (lra_dump_file != NULL) fprintf (lra_dump_file, " Spill %s r%d(hr=%d, freq=%d)\n", pseudo_prefix_title (conflict_regno), conflict_regno,