diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2017-02-16 19:47:15 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2017-02-16 19:47:15 +0000 |
commit | 0a045a1fd8ea884936e37fd16ece42e601ca7a25 (patch) | |
tree | ba9a3477846fe6153bd561991f4b0301f82e893a /gcc | |
parent | 68be8f736732e28eb61e3aead22227ee2dd65a24 (diff) | |
download | gcc-0a045a1fd8ea884936e37fd16ece42e601ca7a25.zip gcc-0a045a1fd8ea884936e37fd16ece42e601ca7a25.tar.gz gcc-0a045a1fd8ea884936e37fd16ece42e601ca7a25.tar.bz2 |
re PR rtl-optimization/78127 (AArch64 internal compiler error: in lra_eliminate, at lra-eliminations.c:1440)
2017-02-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/78127
* lra.c (lra): Call lra_eliminate before finish the loop after
lra_constraint.
From-SVN: r245514
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lra.c | 26 |
2 files changed, 24 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5fc6142..d2a4562 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-16 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/78127 + * lra.c (lra): Call lra_eliminate before finish the loop after + lra_constraint. + 2017-02-16 Richard Biener <rguenther@suse.de> * graphite.h: Do not include isl/isl_val_gmp.h, instead include @@ -2389,14 +2389,7 @@ lra (FILE *f) { for (;;) { - /* We should try to assign hard registers to scratches even - 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) - break; + bool reloads_p = lra_constraints (lra_constraint_iter == 0); /* Constraint transformations may result in that eliminable hard regs become uneliminable and pseudos which use them should be spilled. It is better to do it before pseudo @@ -2406,6 +2399,23 @@ lra (FILE *f) RS6000_PIC_OFFSET_TABLE_REGNUM uneliminable if we started to use a constant pool. */ lra_eliminate (false, false); + /* We should try to assign hard registers to scratches even + 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 (! reloads_p && lra_constraint_iter > 1) + { + /* Stack is not empty here only when there are changes + during the elimination sub-pass. */ + if (bitmap_empty_p (lra_constraint_insn_stack_bitmap)) + break; + else + /* If there are no reloads but changing due + elimination, restart the constraint sub-pass + first. */ + continue; + } /* Do inheritance only for regular algorithms. */ if (! lra_simple_p) { |