[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jakub Jelinek  ---
Fixed.

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Mon Feb  1 22:39:31 2016
New Revision: 233059

URL: https://gcc.gnu.org/viewcvs?rev=233059&root=gcc&view=rev
Log:
PR rtl-optimization/69592
* rtlanal.c (nonzero_bits_binary_arith_p): New inline function.
(cached_nonzero_bits): Use it instead of ARITHMETIC_P.
(num_sign_bit_copies_binary_arith_p): New inline function.
(cached_num_sign_bit_copies): Use it instead of ARITHMETIC_P.

* gcc.dg/pr69592.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr69592.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/rtlanal.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Created attachment 37544
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37544&action=edit
gcc6-pr69592.patch

Untested fix.  Not all ARITHMETIC_P rtxes are handled in nonzero_bits1 or
num_sign_bit_copies1 (and even from those that are only some of them recurse to
both operands).  The cached_* stuff is to catch the cases where we recurse into
both operands; if we don't, then it might be more or significantly more work to
do it instead of less work.
On the included artificial testcase (didn't want to include crypto stuff into a
testcase) on x86_64 we need about 5.5GB of RAM without the patch and almost
nothing with the patch.

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Latent issue triggered by r230856, of course rewriting the testcase by hand to
use __builtin_{add,sub}_overflow instead of the code it uses would trigger this
earlier.
Bet we want to limit the recursion depth of the nonzero_bits and
num_sign_bit_copies.

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

--- Comment #3 from Richard Biener  ---
Created attachment 37540
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37540&action=edit
reduced testcase

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-02-01
 Ever confirmed|0   |1

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Confirmed at least as far back as 15 Jan 2016

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

--- Comment #1 from Richard Biener  ---
In SHA512_Compress, -O2 is enough, unoptimized checking GCC 5 branch builds it
in 5s

[Bug rtl-optimization/69592] [6 Regression] Compile-time and memory-use hog in combine

2016-02-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69592

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.0