public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Any plan for rewriting loop.c using cfgloop.c
@ 2003-10-22 13:11 Richard Kenner
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Kenner @ 2003-10-22 13:11 UTC (permalink / raw)
  To: jh; +Cc: gcc

    To do it correctly one should know about overflow semantics of input
    language not available at RTL level.

I don't see it as particularly hard to propagate that information down to
RTL via some annotation.

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

* Re: Any plan for rewriting loop.c using cfgloop.c
  2003-10-23  7:59   ` Jie Zhang
@ 2003-10-23 14:26     ` Zdenek Dvorak
  0 siblings, 0 replies; 7+ messages in thread
From: Zdenek Dvorak @ 2003-10-23 14:26 UTC (permalink / raw)
  To: Jie Zhang; +Cc: gcc, Richard Kenner, hubicka

Hello,

> >Yes, this is understood problem.  In particular expample, of strength
> >reduction, to do it strength reduction effectivly, one should know what
> >are the costs and addressing modes not available at tree-ssa level.  To
> >do it correctly one should know about overflow semantics of input
> >language not available at RTL level.
> >
> >It is however not very well understood how to best deal with it.  It is
> >probably best to experiment with both implmentations and
> >we will likely end up with loop optimizer split into multiple parts some
> >running at tree-ssa and some running at RTL level.  THat is why I do
> >believe that Zdenek's work on RTL loop optimizer is important even after
> >merging tree-ssa.
> >
> > 
> >
> Yes, I do think so. Most of the existing loop optimizations in loop.c 
> are well suited at RTL level. What I want is rewriting these RTL level 
> loop optimizations using the natural loop discovery code in cfgloop.c. 
> The current loop optimization code in loop.c using the RTL codes, e.g. 
> NOTE_INSN_LOOP_BEG and NOTE_INSN_LOOP_CONT, to find loops. It cannot 
> find loop resulted from the code other than loop statements. Sometimes 
> tt mistakes one-entry loop for multi-enty one and ignores it.
> 
> Where can I find the information and status of Zdenek's work on RTL loop 
> optimizer?

everything is in rtlopt-branch; I have no documentation except comments
in files (loop-*.c).  I have sent some summary of what is implemented
and what needs to be done/improved to the mailing list when
we were discussing a possibility of merging with tree-ssa branch, it
should be easy to find.

Zdenek

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

* Re: Any plan for rewriting loop.c using cfgloop.c
  2003-10-22 10:37 ` Jan Hubicka
@ 2003-10-23  7:59   ` Jie Zhang
  2003-10-23 14:26     ` Zdenek Dvorak
  0 siblings, 1 reply; 7+ messages in thread
From: Jie Zhang @ 2003-10-23  7:59 UTC (permalink / raw)
  To: gcc; +Cc: Richard Kenner, hubicka

Jan Hubicka wrote:

> Yes, this is understood problem.  In particular expample, of strength
> reduction, to do it strength reduction effectivly, one should know what
> are the costs and addressing modes not available at tree-ssa level.  To
> do it correctly one should know about overflow semantics of input
> language not available at RTL level.
>
> It is however not very well understood how to best deal with it.  It is
> probably best to experiment with both implmentations and
> we will likely end up with loop optimizer split into multiple parts some
> running at tree-ssa and some running at RTL level.  THat is why I do
> believe that Zdenek's work on RTL loop optimizer is important even after
> merging tree-ssa.
>
>  
>
Yes, I do think so. Most of the existing loop optimizations in loop.c 
are well suited at RTL level. What I want is rewriting these RTL level 
loop optimizations using the natural loop discovery code in cfgloop.c. 
The current loop optimization code in loop.c using the RTL codes, e.g. 
NOTE_INSN_LOOP_BEG and NOTE_INSN_LOOP_CONT, to find loops. It cannot 
find loop resulted from the code other than loop statements. Sometimes 
tt mistakes one-entry loop for multi-enty one and ignores it.

Where can I find the information and status of Zdenek's work on RTL loop 
optimizer?

Jie


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

* Re: Any plan for rewriting loop.c using cfgloop.c
  2003-10-22  3:25 Richard Kenner
@ 2003-10-22 10:37 ` Jan Hubicka
  2003-10-23  7:59   ` Jie Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Hubicka @ 2003-10-22 10:37 UTC (permalink / raw)
  To: Richard Kenner; +Cc: hubicka, gcc

>     Rest of loop optimizer is going to be more dificult as many of
>     transformations are better done on higher level IL than RTL is 
> 
> I will take this opportunity to state again that I *strongly* disagree
> with that statement.  Many of the transformation can't be done until
> the RTL level because knowing what to do requires detailed knowlege
> of the available instructions.

Yes, this is understood problem.  In particular expample, of strength
reduction, to do it strength reduction effectivly, one should know what
are the costs and addressing modes not available at tree-ssa level.  To
do it correctly one should know about overflow semantics of input
language not available at RTL level.

It is however not very well understood how to best deal with it.  It is
probably best to experiment with both implmentations and
we will likely end up with loop optimizer split into multiple parts some
running at tree-ssa and some running at RTL level.  THat is why I do
believe that Zdenek's work on RTL loop optimizer is important even after
merging tree-ssa.

Honza

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

* Re: Any plan for rewriting loop.c using cfgloop.c
@ 2003-10-22  3:25 Richard Kenner
  2003-10-22 10:37 ` Jan Hubicka
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Kenner @ 2003-10-22  3:25 UTC (permalink / raw)
  To: hubicka; +Cc: gcc

    Rest of loop optimizer is going to be more dificult as many of
    transformations are better done on higher level IL than RTL is 

I will take this opportunity to state again that I *strongly* disagree
with that statement.  Many of the transformation can't be done until
the RTL level because knowing what to do requires detailed knowlege
of the available instructions.

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

* Re: Any plan for rewriting loop.c using cfgloop.c
  2003-10-21 14:02 Jie Zhang
@ 2003-10-21 16:24 ` Jan Hubicka
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Hubicka @ 2003-10-21 16:24 UTC (permalink / raw)
  To: Jie Zhang; +Cc: gcc

> Hi,
> Is there any plan for rewriting the loop optimization code in loop.c 
> using the new loop infrastructure in cfgloop.c? I find current loop 
> optimization in loop.c can be largely improved if using the code in 
> cfgloop.c.

Yes, loop unrolling is already replaced in mainline (and does loop
unswitching and peeling too).  Rest of loop optimizer is going to be
more dificult as many of transformations are better done on higher level
IL than RTL is and thus they are planned on new tree-ssa representation.
In general loop optimizer needs a lot of work :)

Honza
> 
> Jie
> 

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

* Any plan for rewriting loop.c using cfgloop.c
@ 2003-10-21 14:02 Jie Zhang
  2003-10-21 16:24 ` Jan Hubicka
  0 siblings, 1 reply; 7+ messages in thread
From: Jie Zhang @ 2003-10-21 14:02 UTC (permalink / raw)
  To: gcc

Hi,
Is there any plan for rewriting the loop optimization code in loop.c 
using the new loop infrastructure in cfgloop.c? I find current loop 
optimization in loop.c can be largely improved if using the code in 
cfgloop.c.

Jie


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

end of thread, other threads:[~2003-10-23 11:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-22 13:11 Any plan for rewriting loop.c using cfgloop.c Richard Kenner
  -- strict thread matches above, loose matches on Subject: below --
2003-10-22  3:25 Richard Kenner
2003-10-22 10:37 ` Jan Hubicka
2003-10-23  7:59   ` Jie Zhang
2003-10-23 14:26     ` Zdenek Dvorak
2003-10-21 14:02 Jie Zhang
2003-10-21 16:24 ` Jan Hubicka

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).