This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/5] IPA ICF pass
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Martin LiÅka <mliska at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 26 Sep 2014 16:44:41 +0200
- Subject: Re: [PATCH 3/5] IPA ICF pass
- Authentication-results: sourceware.org; auth=none
- References: <c5c2463c07186b4ba35b10f3063ecdd8f8d46d63 dot 1402913001 dot git dot mliska at suse dot cz> <ac1da49f0ee78643bc4521580862fa92e1051764 dot 1402913001 dot git dot mliska at suse dot cz> <20140620073156 dot GC12633 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <alpine dot LSU dot 2 dot 11 dot 1407052337210 dot 30120 at tuna dot site> <20140705225351 dot GK16837 at kam dot mff dot cuni dot cz> <53C7E626 dot 8080400 at suse dot cz> <54255A09 dot 1090305 at suse dot cz>
On 2014.09.26 at 14:20 +0200, Martin LiÅka wrote:
> After couple of weeks I spent with fixing new issues connected to the
> pass: 1) Inliner failed in case I created a thunk and release body of
> a function. In such situation we need to preserve DECL_ARGUMENTS. I
> added new argument for: cgraph_node::release_body. 2) Awkward error
> was hidden in libstdc++ test for trees, there were two functions
> having one argument that differs in one sub-template. Thank to Richard
> who helped me to fix alias set accuracy. 3) There was missing
> comparison for FIELD_DECLS (DECL_FIELD_BIT_OFFSET) which caused me
> miscompilation. 4) After discussion with Honza, we introduced new
> cgraph_node flag called icf_merged. The flag helps to fix verifier in
> cgraph_node::verify.
>
> Current version of the patch can bootstrap on x86_64-linux. With
> following patch applied, there's not testcase regression. I tried to
> build Firefox, Inkscape, GIMP and Chromium with LTO and patch applied
> and no regression has been observed.
While a plain Firefox -flto build works fine. LTO/PGO build fails with:
lto1: internal compiler error: in ipa_merge_profiles, at ipa-utils.c:540
0x7d6165 ipa_merge_profiles(cgraph_node*, cgraph_node*)
../../gcc/gcc/ipa-utils.c:540
0xf10c41 ipa_icf::sem_function::merge(ipa_icf::sem_item*)
../../gcc/gcc/ipa-icf.c:753
0xf15206 ipa_icf::sem_item_optimizer::merge_classes(unsigned int)
../../gcc/gcc/ipa-icf.c:2706
0xf1c1f4 ipa_icf::sem_item_optimizer::execute()
../../gcc/gcc/ipa-icf.c:2098
0xf1d3f1 ipa_icf_driver
../../gcc/gcc/ipa-icf.c:2784
0xf1d3f1 ipa_icf::pass_ipa_icf::execute(function*)
../../gcc/gcc/ipa-icf.c:2831
The pass is also very memory hungry (from 3GB without ICF to 4GB during
libxul link), while the code size savings are in the 1% range.
--
Markus