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