diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2017-04-11 19:39:59 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2017-04-11 19:39:59 +0000 |
commit | 4796d8f620f4a2360e861f336073202c18e649fc (patch) | |
tree | 603c06bdf9a15fe2b1058ab83005c5627b17aecd /gcc | |
parent | df1c878ec25af7e9405b0276e6478fd996c2d3f9 (diff) | |
download | gcc-4796d8f620f4a2360e861f336073202c18e649fc.zip gcc-4796d8f620f4a2360e861f336073202c18e649fc.tar.gz gcc-4796d8f620f4a2360e861f336073202c18e649fc.tar.bz2 |
re PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack frame)
2017-04-11 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/70478
* lra-constraints.c (process_alt_operands): Check memory for
disfavoring memory insn operand.
From-SVN: r246854
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5b4c75..11304c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-04-11 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/70478 + * lra-constraints.c (process_alt_operands): Check memory for + disfavoring memory insn operand. + 2017-04-11 Jakub Jelinek <jakub@redhat.com> PR middle-end/80100 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 82b1ed0..c8bc9b9 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2722,12 +2722,14 @@ process_alt_operands (int only_alternative) } } - /* When we use memory operand, the insn should read the - value from memory and even if we just wrote a value - into the memory it is costly in comparison with an - insn alternative which does not use memory - (e.g. register or immediate operand). */ - if (no_regs_p && offmemok) + /* When we use an operand requiring memory in given + alternative, the insn should write *and* read the + value to/from memory it is costly in comparison with + an insn alternative which does not use memory + (e.g. register or immediate operand). We exclude + memory operand for such case as we can satisfy the + memory constraints by reloading address. */ + if (no_regs_p && offmemok && !MEM_P (op)) { if (lra_dump_file != NULL) fprintf |