* Re: SSA implementation
@ 2000-06-30 3:39 Richard Kenner
2000-06-30 8:38 ` Bruce Korb
2000-06-30 9:14 ` Mark Mitchell
0 siblings, 2 replies; 7+ messages in thread
From: Richard Kenner @ 2000-06-30 3:39 UTC (permalink / raw)
To: mark; +Cc: gcc
We will be contributing a dead-code elimination pass in the very near
future that operates on the SSA form. One big improvement is that
this algorithm is a) very fast and b) can eliminate loops in things
like:
void f () {
int i;
for (i = 0; i < 100; ++i)
;
}
We could always have eliminated such loops, but as I understood it, we
chose not to under the assumption they were there for timing delay
purposes. Has this policy chaged?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SSA implementation
2000-06-30 3:39 SSA implementation Richard Kenner
@ 2000-06-30 8:38 ` Bruce Korb
2000-06-30 9:14 ` Mark Mitchell
1 sibling, 0 replies; 7+ messages in thread
From: Bruce Korb @ 2000-06-30 8:38 UTC (permalink / raw)
To: Richard Kenner; +Cc: mark, gcc
Richard Kenner wrote:
>
> We will be contributing a dead-code elimination pass in the very near
> future that operates on the SSA form. One big improvement is that
> this algorithm is a) very fast and b) can eliminate loops in things
> like:
>
> void f () {
> int i;
> for (i = 0; i < 100; ++i)
> ;
> }
>
> We could always have eliminated such loops, but as I understood it, we
> chose not to under the assumption they were there for timing delay
> purposes. Has this policy chaged?
This won't work for timing delay on advanced processors anyway.
You would have to make "i" be "volatile" or the processor itself
will optimize it away (essentially).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SSA implementation
2000-06-30 3:39 SSA implementation Richard Kenner
2000-06-30 8:38 ` Bruce Korb
@ 2000-06-30 9:14 ` Mark Mitchell
1 sibling, 0 replies; 7+ messages in thread
From: Mark Mitchell @ 2000-06-30 9:14 UTC (permalink / raw)
To: kenner; +Cc: gcc
>>>>> "Richard" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:
Richard> We will be contributing a dead-code elimination pass
Richard> in the very near future that operates on the SSA form.
Richard> One big improvement is that this algorithm is a) very
Richard> fast and b) can eliminate loops in things like:
Richard> void f () { int i; for (i = 0; i < 100; ++i) ; }
Richard> We could always have eliminated such loops, but as I
Richard> understood it, we chose not to under the assumption they
Richard> were there for timing delay purposes. Has this policy
Richard> chaged?
Yes. This was debated to death a year or two ago. The manual has
said:
Historically, GCC has not deleted ``empty'' loops under the
assumption that the most likely reason you would put one in a program is
to have a delay, so deleting them will not make real programs run any
faster.
However, the rationale here is that optimization of a nonempty loop
cannot produce an empty one, which holds for C but is not always the
case for C++.
Moreover, with @samp{-funroll-loops} small ``empty'' loops are already
removed, so the current behavior is both sub-optimal and inconsistent
and will change in the future.
for quite some time.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SSA implementation
2000-06-29 12:11 ` Mark Mitchell
@ 2000-06-29 12:24 ` Gerald Pfeifer
0 siblings, 0 replies; 7+ messages in thread
From: Gerald Pfeifer @ 2000-06-29 12:24 UTC (permalink / raw)
To: Mark Mitchell; +Cc: geoffk, ddolan, gcc, oldham
On Thu, 29 Jun 2000, Mark Mitchell wrote:
> We will be contributing a dead-code elimination pass in the very near
> future that operates on the SSA form. One big improvement is that
> this algorithm is a) very fast and b) can eliminate loops in things
> like:
>
> void f () {
> int i;
> for (i = 0; i < 100; ++i)
> ;
> }
When you do so, please don't also update the "Deleting ``empty'' loops"
section in the GCC manual.
Some time ago I added a note that in the future the behavior described
there will change which apparently is going to happen now. :-)
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
Have a look at http://petition.eurolinux.org -- it's not about Linux, btw!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SSA implementation
2000-06-29 11:59 ` Geoff Keating
@ 2000-06-29 12:11 ` Mark Mitchell
2000-06-29 12:24 ` Gerald Pfeifer
0 siblings, 1 reply; 7+ messages in thread
From: Mark Mitchell @ 2000-06-29 12:11 UTC (permalink / raw)
To: geoffk; +Cc: ddolan, gcc, oldham
>>>>> "Geoff" == Geoff Keating <geoffk@cygnus.com> writes:
Geoff> It does turn the code into SSA form. That's close to
Geoff> everything we want it to do. In the future there will be
Geoff> other things done while the code is in SSA form, but they
Geoff> will be separate passes.
We will be contributing a dead-code elimination pass in the very near
future that operates on the SSA form. One big improvement is that
this algorithm is a) very fast and b) can eliminate loops in things
like:
void f () {
int i;
for (i = 0; i < 100; ++i)
;
}
Jeffrey Oldham has a mostly working implementation of this algorithm.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SSA implementation
2000-06-29 7:30 David Dolan
@ 2000-06-29 11:59 ` Geoff Keating
2000-06-29 12:11 ` Mark Mitchell
0 siblings, 1 reply; 7+ messages in thread
From: Geoff Keating @ 2000-06-29 11:59 UTC (permalink / raw)
To: David Dolan; +Cc: gcc
"David Dolan" <ddolan@andrew.cmu.edu> writes:
> Has the ssa pass been fully implemented in the most current snapshot?
It does turn the code into SSA form. That's close to everything we
want it to do. In the future there will be other things done while
the code is in SSA form, but they will be separate passes.
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* SSA implementation
@ 2000-06-29 7:30 David Dolan
2000-06-29 11:59 ` Geoff Keating
0 siblings, 1 reply; 7+ messages in thread
From: David Dolan @ 2000-06-29 7:30 UTC (permalink / raw)
To: gcc
Has the ssa pass been fully implemented in the most current snapshot?
Thanks!!
Dave Dolan
ddolan@andrew.cmu.edu
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2000-06-30 9:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-30 3:39 SSA implementation Richard Kenner
2000-06-30 8:38 ` Bruce Korb
2000-06-30 9:14 ` Mark Mitchell
-- strict thread matches above, loose matches on Subject: below --
2000-06-29 7:30 David Dolan
2000-06-29 11:59 ` Geoff Keating
2000-06-29 12:11 ` Mark Mitchell
2000-06-29 12:24 ` Gerald Pfeifer
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).