On Mon, Apr 9, 2012 at 8:37 AM, Alexandre Oliva <aol...@redhat.com> wrote: > On Jun 3, 2011, Alexandre Oliva <aol...@redhat.com> wrote: > >> According to http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01082.html >> on Nov 20, 2009, Alexandre Oliva <aol...@redhat.com> wrote: > >>> On Nov 19, 2009, Richard Guenther <richard.guent...@gmail.com> wrote: >>>> In fact this exchanging of the LHS (or rather invalidating of the >>>> SSA name value) should be a helper function that knows >>>> the implementation details and avoids going through releasing >>>> and allocating the name. > >>> Okie dokie, here's a sequence of patches that implements helper >>> functions for this sort of stuff. > >>> The first patch introduces machinery to propagate “dying” DEFs into >>> debug stmts, while replacing them with other SSA_NAMEs. > >> This is already in. > >>> The second extends it so as to enable the old LHS to be redefined >>> e.g. in terms of the new LHS. IIRC this may be useful in some other >>> transformations that, in the process of introducing VTA, I changed from >>> modifying stmts in place to inserting new stmts and removing others. I >>> haven't looked for them yet. > >>> The third uses this new feature for the case at hand, while avoiding >>> computing the reciprocal expression if we know it won't be used. > >> Updated versions of these follow. Regstrapped on x86_64-linux-gnu and >> i686-linux-gnu. Ok to install? > > I was asked to submit these again in stage1, so... Ping? > (updated and re-tested)
+ /* If the conditions in which this function uses VALUE change, + adjust gimple_replace_lhs_wants_value(). */ + gcc_assert (gimple_replace_lhs_wants_value () + == MAY_HAVE_DEBUG_STMTS); + that looks ... odd. But I see you want to conditionally compute value. +static inline bool +gimple_replace_lhs_wants_value (void) +{ + return MAY_HAVE_DEBUG_STMTS; +} but should this not depend on the old stmt / lhs? For example do we really want to do this for artificial variables? I suppose not. Thanks, Richard. > > > -- > Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ > You must be the change you wish to see in the world. -- Gandhi > Be Free! -- http://FSFLA.org/ FSF Latin America board member > Free Software Evangelist Red Hat Brazil Compiler Engineer >