This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Whole program optimization and functions-only-called-once.


On Mon, Nov 16, 2009 at 1:54 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Jan Hubicka wrote:
>>
>>> -fno-ipa-cp should work around your problem for time being.
>>
>> Indeed it did. Some figures:
>
> Thanks for confirmation!
>
>> Considering invlo4 size 1462.
>> ?Called once from lowpass 2293 insns.
>> ?Not inlined because --param large-function-growth limit reached.
>>
>> Considering invlo2 size 933.
>> ?Called once from lowpass 2293 insns.
>> ?Not inlined because --param large-function-growth limit reached.
>>
>> where the largest callee *does* get inlined, while two smaller ones
>> don't (I agree with Jan that this would have been solved by training the
>> inliner with profiling data, because only invlo4 gets called).
>
> Using profiling data does not really make inliner to bypass
> large-function-growth. ?We can experiment with large-function-growth tweaking.
> So far i didn't see any testcase where this limit would result in runtime
> regression.
>
> This is patch I intend to commit after re-testing at x86_64-linux after
> some last minute changes.
>
> ? ? ? ?* cgraph.c (cgraph_release_function_body): Update use of
> ? ? ? ?ipa_transforms_to_apply.
> ? ? ? ?(cgraph_remove_node): Remove ipa_transforms_to_apply.
> ? ? ? ?* cgraph.h (struct cgraph_node): Add ipa_transforms_to_apply.
> ? ? ? ?* cgraphunit.c (save_inline_function_body): Clear ipa_transforms for
> ? ? ? ?copied body.
> ? ? ? ?(cgraph_materialize_clone): Remove original if dead.
> ? ? ? ?* lto-streamer-in.c (lto_read_body): Remove FIXME and
> ? ? ? ?ipa_transforms_to_apply hack.
> ? ? ? ?* function.h (struct function): Add ipa_transforms_to_apply.
> ? ? ? ?* ipa.c (cgraph_remove_unreachable_nodes): Handle dead clone originals.
> ? ? ? ?* tree-inline.c (copy_bb): Update sanity check.
> ? ? ? ?(initialize_cfun): Do not copy ipa_transforms_to_apply.
> ? ? ? ?(expand_call_inline): remove dead clone originals.
> ? ? ? ?(tree_function_versioning): Merge transformation queues.
> ? ? ? ?* passes.c (add_ipa_transform_pass): Remove.
> ? ? ? ?(execute_one_ipa_transform_pass): Update ipa_transforms_to_apply
> ? ? ? ?tracking.
> ? ? ? ?(execute_all_ipa_transforms): Update.
> ? ? ? ?(execute_one_pass): Update.
>
> ? ? ? ?* lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46364


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]