This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA implementation
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: Re: SSA implementation
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 30 Jun 2000 09:13:56 -0700
- Cc: gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <10006301052.AA25097@vlsi1.ultra.nyu.edu>
>>>>> "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