> I suppose that could be done by something like the following, which I > have tested only very mildly so far, in particular I have not double > checked that get_inner_reference is cfun-agnostic.
Thanks, this works fine on the testcase and I believe that get_inner_reference is indeed cfun-agnostic (for example it's called from front-ends). > 2014-12-03 Martin Jambor <mjam...@suse.cz> > > * tree-sra.c (ipa_sra_check_caller_data): New type. > (has_caller_p): Removed. > (ipa_sra_check_caller): New function. > (ipa_sra_preliminary_function_checks): Use it. If Richard and you think it's the way to go, then fine by me. -- Eric Botcazou