On Wed, 15 May 2019, Kewen.Lin wrote:

> 
> on 2019/5/14 下午3:18, Richard Biener wrote:
> > Hum.  The function is somewhat of a hack, trying to produce
> > "reasonable" DECL_RTL, exposing it in expr.[ch] with this
> > name is eventually misleading.  Also you fail to "outline"
> > the most important part:
> > 
> >   FOR_EACH_VEC_ELT (decl_rtl_to_reset, i, obj)
> >     SET_DECL_RTL (obj, NULL_RTX);
> > 
> > which IMHO would warrant making this machinery a class
> > with the above done in its destructor?
> > 
> 
> Good suggestion!  In the IVOPTS implementation, it has one 
> interface free_loop_data to clean up some data structures
> including this decl_rtl_to_reset.  While for the use in 
> "PATCH v2 2/3", we have to clean it artificially once 
> expanding finishes.
> 
> It's better to make it as a class and ensure the clean of
> the vector in its destructor.
> 
> > Maybe name the functions prepare_guessed_decl_rtl ()
> > and the new class guessed_decl_rtl?
> > 
> OK.  Or "tmp" instead of "guessed"?

Also works for me.

Richard.

Reply via email to