From: Martin Liska Date: Fri, 9 Aug 2019 07:50:12 +0000 (+0200) Subject: Implement -fopt-info support for IPA ICF. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe6c4dc41977ce168ba836010424bd05d104b944;p=gcc.git Implement -fopt-info support for IPA ICF. 2019-08-09 Martin Liska * ipa-icf.c (sem_function::merge): Define AUTO_DUMP_SCOPE and use dump_printf to report optimization. (sem_variable::merge): Likwise. (sem_item_optimizer::merge_classes): Use dump_printf to report ICF hits. 2019-08-09 Martin Liska * g++.dg/ipa/ipa-icf-2.C: Add -optimized to -fdump-ipa-icf. * g++.dg/ipa/ipa-icf-3.C: Likewise. * g++.dg/ipa/ipa-icf-4.C: Likewise. * g++.dg/ipa/ipa-icf-6.C: Likewise. * gcc.dg/ipa/ipa-icf-1.c: Likewise. * gcc.dg/ipa/ipa-icf-10.c: Likewise. * gcc.dg/ipa/ipa-icf-11.c: Likewise. * gcc.dg/ipa/ipa-icf-12.c: Likewise. * gcc.dg/ipa/ipa-icf-13.c: Likewise. * gcc.dg/ipa/ipa-icf-16.c: Likewise. * gcc.dg/ipa/ipa-icf-18.c: Likewise. * gcc.dg/ipa/ipa-icf-2.c: Likewise. * gcc.dg/ipa/ipa-icf-20.c: Likewise. * gcc.dg/ipa/ipa-icf-21.c: Likewise. * gcc.dg/ipa/ipa-icf-23.c: Likewise. * gcc.dg/ipa/ipa-icf-25.c: Likewise. * gcc.dg/ipa/ipa-icf-26.c: Likewise. * gcc.dg/ipa/ipa-icf-27.c: Likewise. * gcc.dg/ipa/ipa-icf-3.c: Likewise. * gcc.dg/ipa/ipa-icf-35.c: Likewise. * gcc.dg/ipa/ipa-icf-36.c: Likewise. * gcc.dg/ipa/ipa-icf-37.c: Likewise. * gcc.dg/ipa/ipa-icf-38.c: Likewise. * gcc.dg/ipa/ipa-icf-39.c: Likewise. * gcc.dg/ipa/ipa-icf-5.c: Likewise. * gcc.dg/ipa/ipa-icf-7.c: Likewise. * gcc.dg/ipa/ipa-icf-8.c: Likewise. * gcc.dg/ipa/ipa-icf-merge-1.c: Likewise. * gcc.dg/ipa/pr64307.c: Likewise. * gcc.dg/ipa/pr90555.c: Likewise. From-SVN: r274230 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8d54e1380a..21652c835eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-08-09 Martin Liska + + * ipa-icf.c (sem_function::merge): Define AUTO_DUMP_SCOPE and + use dump_printf to report optimization. + (sem_variable::merge): Likwise. + (sem_item_optimizer::merge_classes): Use dump_printf to report + ICF hits. + 2019-08-09 Martin Liska * value-prof.c (gimple_divmod_fixed_value_transform): diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 13e63b77af1..c9c3cb4a331 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -1024,20 +1024,23 @@ sem_function::merge (sem_item *alias_item) bool original_address_matters = original->address_matters_p (); bool alias_address_matters = alias->address_matters_p (); + AUTO_DUMP_SCOPE ("merge", + dump_user_location_t::from_function_decl (decl)); + if (DECL_EXTERNAL (alias->decl)) { - if (dump_file) - fprintf (dump_file, "Not unifying; alias is external.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; alias is external.\n"); return false; } if (DECL_NO_INLINE_WARNING_P (original->decl) != DECL_NO_INLINE_WARNING_P (alias->decl)) { - if (dump_file) - fprintf (dump_file, - "Not unifying; " - "DECL_NO_INLINE_WARNING mismatch.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; DECL_NO_INLINE_WARNING mismatch.\n"); return false; } @@ -1047,21 +1050,20 @@ sem_function::merge (sem_item *alias_item) || (DECL_SECTION_NAME (alias->decl) && !alias->implicit_section)) && DECL_SECTION_NAME (original->decl) != DECL_SECTION_NAME (alias->decl)) { - if (dump_file) - fprintf (dump_file, - "Not unifying; " - "original and alias are in different sections.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; " + "original and alias are in different sections.\n"); return false; } if (!original->in_same_comdat_group_p (alias) || original->comdat_local_p ()) { - if (dump_file) - fprintf (dump_file, - "Not unifying; alias nor wrapper cannot be created; " - "across comdat group boundary\n\n"); - + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; alias nor wrapper cannot be created; " + "across comdat group boundary\n"); return false; } @@ -1106,10 +1108,10 @@ sem_function::merge (sem_item *alias_item) if (!sem_item::compare_referenced_symbol_properties (NULL, original, alias, alias->address_taken)) { - if (dump_file) - fprintf (dump_file, - "Wrapper cannot be created because referenced symbol " - "properties mismatch\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Wrapper cannot be created because referenced symbol " + "properties mismatch\n"); } /* Do not turn function in one comdat group into wrapper to another comdat group. Other compiler producing the body of the @@ -1120,40 +1122,41 @@ sem_function::merge (sem_item *alias_item) && (DECL_COMDAT_GROUP (alias->decl) != DECL_COMDAT_GROUP (original->decl))) { - if (dump_file) - fprintf (dump_file, - "Wrapper cannot be created because of COMDAT\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Wrapper cannot be created because of COMDAT\n"); } else if (DECL_STATIC_CHAIN (alias->decl) || DECL_STATIC_CHAIN (original->decl)) { - if (dump_file) - fprintf (dump_file, - "Cannot create wrapper of nested function.\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Cannot create wrapper of nested function.\n"); } /* TODO: We can also deal with variadic functions never calling VA_START. */ else if (stdarg_p (TREE_TYPE (alias->decl))) { - if (dump_file) - fprintf (dump_file, - "cannot create wrapper of stdarg function.\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "cannot create wrapper of stdarg function.\n"); } else if (ipa_fn_summaries && ipa_fn_summaries->get (alias) != NULL && ipa_fn_summaries->get (alias)->self_size <= 2) { - if (dump_file) - fprintf (dump_file, "Wrapper creation is not " - "profitable (function is too small).\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, "Wrapper creation is not " + "profitable (function is too small).\n"); } /* If user paid attention to mark function noinline, assume it is somewhat special and do not try to turn it into a wrapper that cannot be undone by inliner. */ else if (lookup_attribute ("noinline", DECL_ATTRIBUTES (alias->decl))) { - if (dump_file) - fprintf (dump_file, "Wrappers are not created for noinline.\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Wrappers are not created for noinline.\n"); } else create_wrapper = true; @@ -1171,9 +1174,10 @@ sem_function::merge (sem_item *alias_item) if (!redirect_callers && !create_wrapper) { - if (dump_file) - fprintf (dump_file, "Not unifying; cannot redirect callers nor " - "produce wrapper\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; cannot redirect callers nor " + "produce wrapper\n"); return false; } @@ -1202,17 +1206,18 @@ sem_function::merge (sem_item *alias_item) redirect_callers = false; if (!local_original) { - if (dump_file) - fprintf (dump_file, "Not unifying; " - "cannot produce local alias.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; cannot produce local alias.\n"); return false; } if (!redirect_callers && !create_wrapper) { - if (dump_file) - fprintf (dump_file, "Not unifying; " - "cannot redirect callers nor produce a wrapper\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; " + "cannot redirect callers nor produce a wrapper\n"); return false; } if (!create_wrapper @@ -1220,9 +1225,10 @@ sem_function::merge (sem_item *alias_item) NULL, true) && !alias->can_remove_if_no_direct_calls_p ()) { - if (dump_file) - fprintf (dump_file, "Not unifying; cannot make wrapper and " - "function has other uses than direct calls\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; cannot make wrapper and " + "function has other uses than direct calls\n"); return false; } } @@ -1238,9 +1244,10 @@ sem_function::merge (sem_item *alias_item) alias->icf_merged = true; local_original->icf_merged = true; - if (dump_file && nredirected) - fprintf (dump_file, "%i local calls have been " - "redirected.\n", nredirected); + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, + "%i local calls have been " + "redirected.\n", nredirected); } /* If all callers was redirected, do not produce wrapper. */ @@ -1272,8 +1279,9 @@ sem_function::merge (sem_item *alias_item) original->call_for_symbol_thunks_and_aliases (set_local, (void *)(size_t) original->local_p (), true); - if (dump_file) - fprintf (dump_file, "Unified; Function alias has been created.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_OPTIMIZED_LOCATIONS, + "Unified; Function alias has been created.\n"); } if (create_wrapper) { @@ -1285,8 +1293,9 @@ sem_function::merge (sem_item *alias_item) ipa_merge_profiles (original, alias, true); alias->create_wrapper (local_original); - if (dump_file) - fprintf (dump_file, "Unified; Wrapper has been created.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_OPTIMIZED_LOCATIONS, + "Unified; Wrapper has been created.\n"); } /* It's possible that redirection can hit thunks that block @@ -1299,8 +1308,8 @@ sem_function::merge (sem_item *alias_item) on this optimization. */ if (original->merged_comdat && !alias->merged_comdat) { - if (dump_file) - fprintf (dump_file, "Dropping merged_comdat flag.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, "Dropping merged_comdat flag.\n"); if (local_original) local_original->merged_comdat = false; original->merged_comdat = false; @@ -1313,8 +1322,9 @@ sem_function::merge (sem_item *alias_item) alias->reset (); alias->body_removed = true; alias->icf_merged = true; - if (dump_file) - fprintf (dump_file, "Unified; Function body was removed.\n"); + if (dump_enabled_p ()) + dump_printf (MSG_OPTIMIZED_LOCATIONS, + "Unified; Function body was removed.\n"); } return true; @@ -2085,18 +2095,21 @@ sem_variable::merge (sem_item *alias_item) { gcc_assert (alias_item->type == VAR); + AUTO_DUMP_SCOPE ("merge", + dump_user_location_t::from_function_decl (decl)); if (!sem_item::target_supports_symbol_aliases_p ()) { - if (dump_file) - fprintf (dump_file, "Not unifying; " - "Symbol aliases are not supported by target\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, "Not unifying; " + "Symbol aliases are not supported by target\n"); return false; } if (DECL_EXTERNAL (alias_item->decl)) { - if (dump_file) - fprintf (dump_file, "Not unifying; alias is external.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; alias is external.\n"); return false; } @@ -2128,9 +2141,9 @@ sem_variable::merge (sem_item *alias_item) if (DECL_IN_CONSTANT_POOL (alias->decl) || DECL_IN_CONSTANT_POOL (original->decl)) { - if (dump_file) - fprintf (dump_file, - "Not unifying; constant pool variables.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; constant pool variables.\n"); return false; } @@ -2140,45 +2153,48 @@ sem_variable::merge (sem_item *alias_item) || (DECL_SECTION_NAME (alias->decl) && !alias->implicit_section)) && DECL_SECTION_NAME (original->decl) != DECL_SECTION_NAME (alias->decl)) { - if (dump_file) - fprintf (dump_file, - "Not unifying; " - "original and alias are in different sections.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; " + "original and alias are in different sections.\n"); return false; } /* We cannot merge if address comparsion metters. */ if (alias_address_matters && flag_merge_constants < 2) { - if (dump_file) - fprintf (dump_file, - "Not unifying; address of original may be compared.\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; address of original may be compared.\n"); return false; } if (DECL_ALIGN (original->decl) < DECL_ALIGN (alias->decl)) { - if (dump_file) - fprintf (dump_file, "Not unifying; " - "original and alias have incompatible alignments\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; " + "original and alias have incompatible alignments\n"); return false; } if (DECL_COMDAT_GROUP (original->decl) != DECL_COMDAT_GROUP (alias->decl)) { - if (dump_file) - fprintf (dump_file, "Not unifying; alias cannot be created; " - "across comdat group boundary\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; alias cannot be created; " + "across comdat group boundary\n"); return false; } if (original_discardable) { - if (dump_file) - fprintf (dump_file, "Not unifying; alias cannot be created; " - "target is discardable\n\n"); + if (dump_enabled_p ()) + dump_printf (MSG_MISSED_OPTIMIZATION, + "Not unifying; alias cannot be created; " + "target is discardable\n"); return false; } @@ -2199,8 +2215,9 @@ sem_variable::merge (sem_item *alias_item) varpool_node::create_alias (alias_var->decl, decl); alias->resolve_alias (original); - if (dump_file) - fprintf (dump_file, "Unified; Variable alias has been created.\n"); + if (dump_enabled_p ()) + dump_printf (MSG_OPTIMIZED_LOCATIONS, + "Unified; Variable alias has been created.\n"); return true; } @@ -3477,23 +3494,26 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) if (alias == source) continue; - if (dump_file) + dump_user_location_t loc + = dump_user_location_t::from_function_decl (source->decl); + if (dump_enabled_p ()) { - fprintf (dump_file, "Semantic equality hit:%s->%s\n", - xstrdup_for_dump (source->node->name ()), - xstrdup_for_dump (alias->node->name ())); - fprintf (dump_file, "Assembler symbol names:%s->%s\n", - xstrdup_for_dump (source->node->asm_name ()), - xstrdup_for_dump (alias->node->asm_name ())); + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "Semantic equality hit:%s->%s\n", + xstrdup_for_dump (source->node->name ()), + xstrdup_for_dump (alias->node->name ())); + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "Assembler symbol names:%s->%s\n", + xstrdup_for_dump (source->node->asm_name ()), + xstrdup_for_dump (alias->node->asm_name ())); } if (lookup_attribute ("no_icf", DECL_ATTRIBUTES (alias->decl))) { - if (dump_file) - fprintf (dump_file, - "Merge operation is skipped due to no_icf " - "attribute.\n\n"); - + if (dump_enabled_p ()) + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "Merge operation is skipped due to no_icf " + "attribute.\n"); continue; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e64565e0467..73022f37b1f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,36 @@ +2019-08-09 Martin Liska + + * g++.dg/ipa/ipa-icf-2.C: Add -optimized to -fdump-ipa-icf. + * g++.dg/ipa/ipa-icf-3.C: Likewise. + * g++.dg/ipa/ipa-icf-4.C: Likewise. + * g++.dg/ipa/ipa-icf-6.C: Likewise. + * gcc.dg/ipa/ipa-icf-1.c: Likewise. + * gcc.dg/ipa/ipa-icf-10.c: Likewise. + * gcc.dg/ipa/ipa-icf-11.c: Likewise. + * gcc.dg/ipa/ipa-icf-12.c: Likewise. + * gcc.dg/ipa/ipa-icf-13.c: Likewise. + * gcc.dg/ipa/ipa-icf-16.c: Likewise. + * gcc.dg/ipa/ipa-icf-18.c: Likewise. + * gcc.dg/ipa/ipa-icf-2.c: Likewise. + * gcc.dg/ipa/ipa-icf-20.c: Likewise. + * gcc.dg/ipa/ipa-icf-21.c: Likewise. + * gcc.dg/ipa/ipa-icf-23.c: Likewise. + * gcc.dg/ipa/ipa-icf-25.c: Likewise. + * gcc.dg/ipa/ipa-icf-26.c: Likewise. + * gcc.dg/ipa/ipa-icf-27.c: Likewise. + * gcc.dg/ipa/ipa-icf-3.c: Likewise. + * gcc.dg/ipa/ipa-icf-35.c: Likewise. + * gcc.dg/ipa/ipa-icf-36.c: Likewise. + * gcc.dg/ipa/ipa-icf-37.c: Likewise. + * gcc.dg/ipa/ipa-icf-38.c: Likewise. + * gcc.dg/ipa/ipa-icf-39.c: Likewise. + * gcc.dg/ipa/ipa-icf-5.c: Likewise. + * gcc.dg/ipa/ipa-icf-7.c: Likewise. + * gcc.dg/ipa/ipa-icf-8.c: Likewise. + * gcc.dg/ipa/ipa-icf-merge-1.c: Likewise. + * gcc.dg/ipa/pr64307.c: Likewise. + * gcc.dg/ipa/pr90555.c: Likewise. + 2019-08-09 Martin Liska * g++.dg/tree-prof/indir-call-prof.C: Add -optimize diff --git a/gcc/testsuite/g++.dg/ipa/ipa-icf-2.C b/gcc/testsuite/g++.dg/ipa/ipa-icf-2.C index 9e780061270..7f56189eebb 100644 --- a/gcc/testsuite/g++.dg/ipa/ipa-icf-2.C +++ b/gcc/testsuite/g++.dg/ipa/ipa-icf-2.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ class A { diff --git a/gcc/testsuite/g++.dg/ipa/ipa-icf-3.C b/gcc/testsuite/g++.dg/ipa/ipa-icf-3.C index 4747b3094d1..5a3cca24fa2 100644 --- a/gcc/testsuite/g++.dg/ipa/ipa-icf-3.C +++ b/gcc/testsuite/g++.dg/ipa/ipa-icf-3.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ __attribute__ ((noinline)) int zero() diff --git a/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C b/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C index b552ef4cb13..86954055382 100644 --- a/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C +++ b/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf -fno-inline" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized -fno-inline" } */ namespace { struct A diff --git a/gcc/testsuite/g++.dg/ipa/ipa-icf-6.C b/gcc/testsuite/g++.dg/ipa/ipa-icf-6.C index d7650e4b502..7bcb9dc4808 100644 --- a/gcc/testsuite/g++.dg/ipa/ipa-icf-6.C +++ b/gcc/testsuite/g++.dg/ipa/ipa-icf-6.C @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O3 -fdump-ipa-icf" } */ +/* { dg-options "-O3 -fdump-ipa-icf-optimized" } */ struct A { A() {ptr=&b;} diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c index a3d88585a9e..8cb9186238c 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c index 5f76c1d87e7..8fdac3883ee 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ int ferda(int x, int y) __attribute__ ((pure)); int funkce(int a, int b) __attribute__ ((pure)); diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c index 2610af9e55c..dbc0cbe7b61 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ __attribute__ ((noinline)) int fce(int a, int b) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c index 8e4aa56b032..7ed75f8bfd9 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ #include #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c index 09d817c4030..d58f182d237 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all" } */ #include #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c index a2613af5dd5..b11cae06534 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c index e246c2b3404..7753e1e4abb 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ __attribute__ ((noinline)) int foo(int x) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c index 983e3d818d0..e6e165a9a62 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c index 46dc70492f0..42e9ce95f09 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c index a20b4a43ffe..ea7164c2ef7 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O2 -msse2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -msse2 -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c index 02bb138c28d..805a406efed 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ struct A { diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c index 4b364eb7c72..5b963a843e7 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized-all" } */ static int zip(); static int zap(); diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c index 325ece1befa..42c538630c2 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ void destroy (void) { diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c index bc49e58cb95..a2ce86ab1db 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf -fno-inline" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized -fno-inline" } */ void destroy (void) { diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c index 2ecab2335c2..8d83a281cd0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ typedef int v4si __attribute__ ((vector_size (16))); diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c index d194f918fd0..03bac84bdbe 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all" } */ void f1() { diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c index 5d125d0e1b7..e630b6dc140 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf -fmerge-all-constants" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all-all-all -fmerge-all-constants" } */ static int a; static int b; static const int c = 2; diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c index 5c02e8ec336..e482bd275d9 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all-all-all" } */ static int a; static int b; static const int c = 2; diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c index 788038a1c68..b9aea90b400 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c @@ -1,5 +1,5 @@ /* { dg-do link } */ -/* { dg-options "-O2 -fdump-ipa-icf -flto -fdump-tree-optimized" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized -flto -fdump-tree-optimized" } */ /* { dg-require-effective-target lto } */ /* { dg-additional-sources "ipa-icf-38a.c" }*/ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c index a60721ffbd5..83ccd20ac56 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-alias "" } */ -/* { dg-options "-O2 -fdump-ipa-icf -fmerge-all-constants -fdbg-cnt=merged_ipa_icf:1:3" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized -fmerge-all-constants -fdbg-cnt=merged_ipa_icf:1:3" } */ /* { dg-prune-output "dbg_cnt 'merged_ipa_icf' set to 1-3" } */ /* { dg-prune-output "\\*\\*\\*dbgcnt:.*limit.*reached" } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c index b2d48f9d79d..40d71740f65 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c @@ -1,5 +1,5 @@ /* { dg-do compile { target c99_runtime } } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ /* { dg-add-options c99_runtime } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c index 488e133d93f..87a6d261b3b 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c @@ -1,5 +1,5 @@ /* { dg-do compile { target c99_runtime } } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ /* { dg-add-options c99_runtime } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c index 8ee46d034e7..fe95c2ccd56 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-icf" } */ +/* { dg-options "-O2 -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c index 06958a4d69d..f96e8e866a4 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O2 -fdump-ipa-icf" } */ +/* { dg-additional-options "-O2 -fdump-ipa-icf-optimized" } */ /* Picking 'main' as a candiate target for equivalent functios is not a good idea. */ diff --git a/gcc/testsuite/gcc.dg/ipa/pr64307.c b/gcc/testsuite/gcc.dg/ipa/pr64307.c index 79d93af6eb7..e2c9121c037 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr64307.c +++ b/gcc/testsuite/gcc.dg/ipa/pr64307.c @@ -1,5 +1,5 @@ /* { dg-do compile { target c99_runtime } } */ -/* { dg-options "-O0 -fipa-icf -fdump-ipa-icf" } */ +/* { dg-options "-O0 -fipa-icf -fdump-ipa-icf-optimized" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/pr90555.c b/gcc/testsuite/gcc.dg/ipa/pr90555.c index 327cff9dcdd..d357405bb9a 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr90555.c +++ b/gcc/testsuite/gcc.dg/ipa/pr90555.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-fopenmp-simd -O2 -mavx512f -fdump-ipa-icf" } */ +/* { dg-options "-fopenmp-simd -O2 -mavx512f -fdump-ipa-icf-optimized" } */ #define N 1024 int a[N];