[PATCH][GCC 7] Fix PR70171

Richard Biener rguenther@suse.de
Mon Mar 14 08:56:00 GMT 2016


On Fri, 11 Mar 2016, Eric Botcazou wrote:

> > The following teaches phiprop to handle the case of aggregate copies
> > where the aggregate has non-BLKmode which means it is very likely
> > expanded as reg-reg moves (any better test for that apart from
> > checking for non-BLKmode?).  
> 
> !aggregate_value_p comes to mind, but non-BLKmode is the definitive test to 
> distinguish the register from the non-register case at the RTL level.

It looks like it might catch a few extra cases where the address of the
decl is required.  But it also looks like it's somewhat overly broad like

  /* Function types that are TREE_ADDRESSABLE force return in memory.  */
  if (fntype && TREE_ADDRESSABLE (fntype))
    return 1;

without actually testing 'exp' is the return slot.  In fact most of
the function cares about function return values and some about
parameters.  I guess the predicate should be split up (a quick grep
shows most callers care about the return value case).

Richard.



More information about the Gcc-patches mailing list