public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/60757] New: combine uses exponential time in nonzero_bits1 recursion
@ 2014-04-04  1:42 amylaar at gcc dot gnu.org
  2014-04-04  1:44 ` [Bug rtl-optimization/60757] " amylaar at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-04  1:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

            Bug ID: 60757
           Summary: combine uses exponential time in nonzero_bits1
                    recursion
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amylaar at gcc dot gnu.org

Created attachment 32540
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32540&action=edit
pruned down testcase

With a small fix to the rtx_costs for epiphany, gcc.c-torture/compile/pr43415.c
times out compiling at -O3.
Even when the loop iteration counts are pruned, it's still too much,
as nonzero_bits recurses for both operands of a binary operator...
going through 40 operations means 2^40 paths being followed...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion
  2014-04-04  1:42 [Bug rtl-optimization/60757] New: combine uses exponential time in nonzero_bits1 recursion amylaar at gcc dot gnu.org
@ 2014-04-04  1:44 ` amylaar at gcc dot gnu.org
  2014-04-04  8:34 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-04  1:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #1 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Created attachment 32541
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32541&action=edit
epiphany cost fix that triggers combine exponential behaviour


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion
  2014-04-04  1:42 [Bug rtl-optimization/60757] New: combine uses exponential time in nonzero_bits1 recursion amylaar at gcc dot gnu.org
  2014-04-04  1:44 ` [Bug rtl-optimization/60757] " amylaar at gcc dot gnu.org
@ 2014-04-04  8:34 ` rguenth at gcc dot gnu.org
  2014-04-04 14:01 ` amylaar at gcc dot gnu.org
  2014-04-04 14:08 ` amylaar at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-04  8:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you point to the recursion please?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion
  2014-04-04  1:42 [Bug rtl-optimization/60757] New: combine uses exponential time in nonzero_bits1 recursion amylaar at gcc dot gnu.org
  2014-04-04  1:44 ` [Bug rtl-optimization/60757] " amylaar at gcc dot gnu.org
  2014-04-04  8:34 ` rguenth at gcc dot gnu.org
@ 2014-04-04 14:01 ` amylaar at gcc dot gnu.org
  2014-04-04 14:08 ` amylaar at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-04 14:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #3 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Created attachment 32544
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32544&action=edit
typescript with backtrace

It appears that some other epiphany patches I had in my tree I thought were
unrelated are, in fact, also relevant.

The exact version I've been using can be retrieved with:

git clone git@github.com:adapteva/epiphany-gcc.git
cd epiphany-gcc
git checkout ee67b804bd922ddcc72695973bed4641ba29801c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion
  2014-04-04  1:42 [Bug rtl-optimization/60757] New: combine uses exponential time in nonzero_bits1 recursion amylaar at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-04-04 14:01 ` amylaar at gcc dot gnu.org
@ 2014-04-04 14:08 ` amylaar at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-04-04 14:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #4 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
(In reply to Jorn Wolfgang Rennecke from comment #3)
> Created attachment 32544 [details]
> typescript with backtrace
> 
> It appears that some other epiphany patches I had in my tree I thought were
> unrelated are, in fact, also relevant.
> 
> The exact version I've been using can be retrieved with:
> 
> git clone git@github.com:adapteva/epiphany-gcc.git
> cd epiphany-gcc
> git checkout ee67b804bd922ddcc72695973bed4641ba29801c

P.S.: that version sits on branch epiphany-gcc-4.8, so it should be sufficient
to clone that branch.  And it's based on the gcc git mirror, so if you have
a git local repo with gcc git mirror contents, most of the objects should
already be there.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-04 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04  1:42 [Bug rtl-optimization/60757] New: combine uses exponential time in nonzero_bits1 recursion amylaar at gcc dot gnu.org
2014-04-04  1:44 ` [Bug rtl-optimization/60757] " amylaar at gcc dot gnu.org
2014-04-04  8:34 ` rguenth at gcc dot gnu.org
2014-04-04 14:01 ` amylaar at gcc dot gnu.org
2014-04-04 14:08 ` amylaar at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).