> On 12/11/2013 12:14 PM, Jan Hubicka wrote: > >>Is ipa_passes the right place to initialize calls_comdat_local? > > > >The flag is probably needed in both early inliner and IPA inliner. A > >conservative > >place to initialize it would be in inline_analyze_function. > >(early inliner analyze function twice, first before inlining and next after > >early optimization, so the update should also clear the flag if call > >disapeared). > > Unfortunately early inlining doesn't call inline_analyze_function on > all functions, so we need to initialize it somewhere else. Is there > a reason not to set up an initial value in ipa_passes?
Well, less thing we have done behind passmanager back, the better. ipa-passes should really just set up compiler to execute ipa passes, but it should not do any analysis by itself. Every function we inline or clone needs to go through the inliner's analysis. But looking into it now, the place is probably compute_inline_paremeters, since inline_analyze_function is just a wrapper for the IPA pass, but pass_data_inline_parameters bypass it (this is bit confusing - I will clean it up) Honza > > >I think we also want to clear it if call to comdat local function is marked > >inline. > > Makes sense. > > Jason