public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/24814]  New: unrolling doesn't put loop notes in right place
@ 2005-11-11 20:57 amylaar at gcc dot gnu dot org
  2005-11-11 20:59 ` [Bug rtl-optimization/24814] " amylaar at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-11-11 20:57 UTC (permalink / raw)
  To: gcc-bugs




-- 
           Summary: unrolling doesn't put loop notes in right place
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
@ 2005-11-11 20:59 ` amylaar at gcc dot gnu dot org
  2005-11-11 21:05 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-11-11 20:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from amylaar at gcc dot gnu dot org  2005-11-11 20:59 -------
Created an attachment (id=10221)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10221&action=view)
test case

When compiling this test case with -O2 -funroll-loops for i686 or sh-elf, the
NOTE_INSN_LOOP_BEG and NOTE_INSN_LOOP_END notes end up adjacent before the
loop,
as can be seen in the .23.loop2_done dump file.


-- 


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
  2005-11-11 20:59 ` [Bug rtl-optimization/24814] " amylaar at gcc dot gnu dot org
@ 2005-11-11 21:05 ` pinskia at gcc dot gnu dot org
  2005-11-11 21:44 ` amylaar at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-11 21:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-11-11 21:05 -------
LOOP NOTES should be removed in 4.2 when loop.c is removed.


-- 


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
  2005-11-11 20:59 ` [Bug rtl-optimization/24814] " amylaar at gcc dot gnu dot org
  2005-11-11 21:05 ` pinskia at gcc dot gnu dot org
@ 2005-11-11 21:44 ` amylaar at gcc dot gnu dot org
  2006-02-27 14:06 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-11-11 21:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from amylaar at gcc dot gnu dot org  2005-11-11 21:44 -------
(In reply to comment #2)
> LOOP NOTES should be removed in 4.2 when loop.c is removed.
> 

There is more than loop.c which currently uses LOOP NOTES.


-- 


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-11-11 21:44 ` amylaar at gcc dot gnu dot org
@ 2006-02-27 14:06 ` steven at gcc dot gnu dot org
  2006-03-07 20:52 ` amylaar at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-02-27 14:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from steven at gcc dot gnu dot org  2006-02-27 14:04 -------
Actually there is nothing that uses LOOP_NOTEs other than the old RTL loop
optimizer.  At least, nothing that _should_ use it.  Wanna know about loops? 
Find natural loops instead of depending on the notes.

But the point is moot, the old RTL loop optimizer is no more.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-02-27 14:06 ` steven at gcc dot gnu dot org
@ 2006-03-07 20:52 ` amylaar at gcc dot gnu dot org
  2006-03-07 21:50 ` dberlin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-03-07 20:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from amylaar at gcc dot gnu dot org  2006-03-07 20:52 -------
(In reply to comment #4)
> Actually there is nothing that uses LOOP_NOTEs other than the old RTL loop
> optimizer.  At least, nothing that _should_ use it.  Wanna know about loops? 
> Find natural loops instead of depending on the notes.

So you are saying I should put natural loop detection into the SH backend so
that it can decide if it should save all target registers?

Note that the branch probability estimation machinery does not set estimated
execution counts, so the execution counts are unusable without profile data.

> But the point is moot, the old RTL loop optimizer is no more.

It had its weaknesses, but at least it was well-tuned for a wide range of
target architectures and operated generally well together with the rest of the
compiler.  What we have now is a collection of passes that often work at
cross-purposes.  E.g. web, loop strength reduction/unrolling and
auto-increment generation are completely out of sync.


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-03-07 20:52 ` amylaar at gcc dot gnu dot org
@ 2006-03-07 21:50 ` dberlin at gcc dot gnu dot org
  2006-03-07 22:43 ` amylaar at gcc dot gnu dot org
  2006-04-24 22:34 ` steven at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2006-03-07 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dberlin at gcc dot gnu dot org  2006-03-07 21:50 -------
(In reply to comment #5)
> (In reply to comment #4)
> > Actually there is nothing that uses LOOP_NOTEs other than the old RTL loop
> > optimizer.  At least, nothing that _should_ use it.  Wanna know about loops? 
> > Find natural loops instead of depending on the notes.
> 
> So you are saying I should put natural loop detection into the SH backend so
> that it can decide if it should save all target registers?
> 
Yes, if you need to detect loops, call the routine to detect natural loops.
This is the way of the future.
LOOP_NOTES are not.

I agree that this bug should be marked WONTFIX.

> It had its weaknesses, but at least it was well-tuned for a wide range of
> target architectures and operated generally well together with the rest of the
> compiler.  What we have now is a collection of passes that often work at
> cross-purposes.  E.g. web, loop strength reduction/unrolling and
> auto-increment generation are completely out of sync.

Completely irrelevant to this bug.

> 


-- 


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-03-07 21:50 ` dberlin at gcc dot gnu dot org
@ 2006-03-07 22:43 ` amylaar at gcc dot gnu dot org
  2006-04-24 22:34 ` steven at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-03-07 22:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from amylaar at gcc dot gnu dot org  2006-03-07 22:42 -------
(In reply to comment #6)
> Yes, if you need to detect loops, call the routine to detect natural loops.
> This is the way of the future.
> LOOP_NOTES are not.

Is flow_loops_find and the data that it initailizes a stable interface, and
can it be safely called from prologue/epilogue generation?
I see no mention of this function in the files in doc/ ; the loop notes
are documented there, though.


-- 


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


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

* [Bug rtl-optimization/24814] unrolling doesn't put loop notes in right place
  2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-03-07 22:43 ` amylaar at gcc dot gnu dot org
@ 2006-04-24 22:34 ` steven at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-04-24 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from steven at gcc dot gnu dot org  2006-04-24 22:34 -------
What are loop notes again?  Ah, yes.  Legacy.  Fixed on mainline.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2006-04-24 22:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-11 20:57 [Bug rtl-optimization/24814] New: unrolling doesn't put loop notes in right place amylaar at gcc dot gnu dot org
2005-11-11 20:59 ` [Bug rtl-optimization/24814] " amylaar at gcc dot gnu dot org
2005-11-11 21:05 ` pinskia at gcc dot gnu dot org
2005-11-11 21:44 ` amylaar at gcc dot gnu dot org
2006-02-27 14:06 ` steven at gcc dot gnu dot org
2006-03-07 20:52 ` amylaar at gcc dot gnu dot org
2006-03-07 21:50 ` dberlin at gcc dot gnu dot org
2006-03-07 22:43 ` amylaar at gcc dot gnu dot org
2006-04-24 22:34 ` steven at gcc dot gnu dot 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).