From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Mitchell To: kenner@vlsi1.ultra.nyu.edu Cc: gcc@gcc.gnu.org Subject: Re: SSA implementation Date: Fri, 30 Jun 2000 09:14:00 -0000 Message-id: <20000630091356D.mitchell@codesourcery.com> References: <10006301052.AA25097@vlsi1.ultra.nyu.edu> X-SW-Source: 2000-06/msg00805.html >>>>> "Richard" == Richard Kenner 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