This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ipa-icf::merge TLC
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Jack Howarth <howarth dot at dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "mliska at suse dot cz" <mliska at suse dot cz>, Jakub Jelinek <jakub at redhat dot com>, Alan Lawrence <alalaw01 at arm dot com>, Alex Velenko <alevel01 at arm dot com>
- Date: Sat, 28 Feb 2015 10:13:57 +0000
- Subject: Re: ipa-icf::merge TLC
- Authentication-results: sourceware.org; auth=none
- References: <20150225083810 dot GA86854 at kam dot mff dot cuni dot cz> <CAJMcOU-9=VSQK3RgDqezLbkQq=0CkCWC6VSaR1UxQaFopp4=sA at mail dot gmail dot com> <20150227021047 dot GA20437 at kam dot mff dot cuni dot cz>
On Fri, Feb 27, 2015 at 02:10:47AM +0000, Jan Hubicka wrote:
> * ipa-icf.c (symbol_compare_collection::symbol_compare_colleciton):
> Use address_matters_p.
> (redirect_all_callers, set_addressable): New functions.
> (sem_function::merge): Reorganize and fix merging issues.
> (sem_variable::merge): Likewise.
> (sem_variable::compare_sections): Remove.
> * common.opt (fmerge-all-constants, fmerge-constants): Remove
> Optimization flag.
> * symtab.c (symtab_node::resolve_alias): When alias has aliases,
> redirect them.
> (symtab_node::make_decl_local): Set ADDRESSABLE bit when
> decl is used.
> (address_matters_1): New function.
> (symtab_node::address_matters_p): New function.
> * cgraph.c (cgraph_edge::verify_corresponds_to_fndecl): Fix
> check for merged flag.
> * cgraph.h (address_matters_p): Declare.
> (symtab_node::address_taken_from_non_vtable_p): Remove.
> (symtab_node::address_can_be_compared_p): New method.
> (ipa_ref::address_matters_p): Move here from ipa-ref.c; simplify.
> * ipa-visibility.c (symtab_node::address_taken_from_non_vtable_p):
> Remove.
> (comdat_can_be_unshared_p_1) Use address_matters_p.
> (update_vtable_references): Fix formating.
> * ipa-ref.c (ipa_ref::address_matters_p): Move inline.
> * cgraphunit.c (cgraph_node::create_wrapper): Drop UNINLINABLE flag.
> * cgraphclones.c: Preserve merged and icf_merged flags.
>
> * gcc.dg/pr64454.c: Disable ICF.
> * gcc.dg/pr28685-1.c: Disable ICF
> * gcc.dg/ipa/iinline-5.c: Disable ICF.
> * g++.dg/warn/Wsuggest-final.C: Force methods to be different.
> * g++.dg/ipa/ipa-icf-4.C: Update template.
Hi Honza,
This is more a note for other interested AArch64 testers, but this patch
breaks some tests on aarch64-none-elf. Looking at the test output, this
is a problem with the tests than with your patch. We now eliminate some
function bodies which are identical across test functions, causing us to
fail some scan-assembler directives.
The fix is straightforward, we just need to add -fno-ipa-icf to get things
working again. This keeps the spirit of the original tests. I'll propose
a patch along those lines on Monday.
Thanks,
James
---
PASS->FAIL: gcc.target/aarch64/atomic-comp-swap-release-acquire.c scan-assembler-times ldaxr\tw[0-9]+, \\[x[0-9]+\\] 4
PASS->FAIL: gcc.target/aarch64/atomic-comp-swap-release-acquire.c scan-assembler-times stlxr\tw[0-9]+, w[0-9]+, \\[x[0-9]+\\] 4
PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times saddl2\tv[0-9]+.2d, v[0-9]+.4s, v[0-9]+.4s 2
PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times saddl\tv[0-9]+.2d, v[0-9]+.2s, v[0-9]+.2s 2
PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times ssubl2\tv[0-9]+.2d, v[0-9]+.4s, v[0-9]+.4s 5
PASS->FAIL: gcc.target/aarch64/vect_saddl_1.c scan-assembler-times ssubl\tv[0-9]+.2d, v[0-9]+.2s, v[0-9]+.2s 5
PASS->FAIL: gcc.target/aarch64/vect_smlal_1.c scan-assembler-times smlsl2\tv[0-9]+.8h 5
PASS->FAIL: gcc.target/aarch64/vect_smlal_1.c scan-assembler-times smlsl\tv[0-9]+.8h 5