Implement -fopt-info support for IPA ICF.
authorMartin Liska <mliska@suse.cz>
Fri, 9 Aug 2019 07:50:12 +0000 (09:50 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 9 Aug 2019 07:50:12 +0000 (07:50 +0000)
2019-08-09  Martin Liska  <mliska@suse.cz>

* 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  <mliska@suse.cz>

* 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

33 files changed:
gcc/ChangeLog
gcc/ipa-icf.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/ipa-icf-2.C
gcc/testsuite/g++.dg/ipa/ipa-icf-3.C
gcc/testsuite/g++.dg/ipa/ipa-icf-4.C
gcc/testsuite/g++.dg/ipa/ipa-icf-6.C
gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c
gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c
gcc/testsuite/gcc.dg/ipa/pr64307.c
gcc/testsuite/gcc.dg/ipa/pr90555.c

index b8d54e1380a284da4ff33a479b3ef6b0983e9894..21652c835eb7ae8e887a4c7634d37668f45f7e90 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-09  Martin Liska  <mliska@suse.cz>
+
+       * 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  <mliska@suse.cz>
 
        * value-prof.c (gimple_divmod_fixed_value_transform):
index 13e63b77af197280c9cbd65a407309d692d3f4eb..c9c3cb4a331450277f404595adfb02dc1818fc4e 100644 (file)
@@ -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;
              }
 
index e64565e04671e2e61cafbe8c9f6bf43b49ec978b..73022f37b1fba8d99ba32fa612b4363781cd3db3 100644 (file)
@@ -1,3 +1,36 @@
+2019-08-09  Martin Liska  <mliska@suse.cz>
+
+       * 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  <mliska@suse.cz>
 
        * g++.dg/tree-prof/indir-call-prof.C: Add -optimize
index 9e780061270e2bc543d08883fd10a3ece7bb189c..7f56189eebbc31df9bcc861b8b27bbcd5b615c71 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 class A
 {
index 4747b3094d10bd4737adb7f8d0e8be68596d7175..5a3cca24fa27ca3505f0ee993ce8465a684f6315 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 __attribute__ ((noinline))
 int zero()
index b552ef4cb13e5e2bccbbc8844ccd081cd187d16c..86954055382f9748cf08507d5c26d9b0bcc6fe92 100644 (file)
@@ -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
index d7650e4b502f896bd90c95b666a2b5e2643b6950..7bcb9dc4808afc0f52b9762869a0362f1c783931 100644 (file)
@@ -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;}                                                                 
index a3d88585a9e57c3218511f4897c82d6d59e987c2..8cb9186238ceae1c037e318b11cff13101c19f97 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 #include <stdio.h>
 
index 5f76c1d87e739ee8512bd1c384fffa22c0ed0540..8fdac3883ee5bbde23f272816d7f6ae11dd59ce2 100644 (file)
@@ -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));
index 2610af9e55cb599933564dcf2cfa4d16e41bf5aa..dbc0cbe7b616f9ce32ba20280c7704b0c0a6ec23 100644 (file)
@@ -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)
index 8e4aa56b032f217b46e4db060c65d425fee8234e..7ed75f8bfd924596042413d7771eb930af9e0644 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 #include <stdlib.h>
 #include <stdio.h>
index 09d817c4030b5aa1c4f8b4fd43f1d0602c81877c..d58f182d23771a372f242cdc8a3d88cfd6db9e34 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all"  } */
 
 #include <stdlib.h>
 #include <stdio.h>
index a2613af5dd5e80b4ee65a6bdae2a834c13bb438b..b11cae06534d711322d96431e6f4f54c13b6f4cb 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 #include <stdio.h>
 
index e246c2b340421264251fe69d57af0fddc7951d57..7753e1e4abb29aa158350f002ad267fcbc7194c3 100644 (file)
@@ -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)
index 983e3d818d0c3d4da1886f019dac21d3e5741c2e..e6e165a9a62ca6913844d7ce9d0d681f0c95fe77 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 #include <stdio.h>
 
index 46dc70492f0c5708969fb629c7590df2a8d37327..42e9ce95f09b2593ddca1a452873dbc06b0125a2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 #include <math.h>
 
index a20b4a43ffe156a6ff314f672a5716d810980b29..ea7164c2ef7e57fce98913baf692a7e7be834df3 100644 (file)
@@ -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 <xmmintrin.h>
 
index 02bb138c28d369517713f354924243c7d48d75be..805a406efed87a30a358ee05f8f1b4dcde63fc88 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 struct A
 {
index 4b364eb7c72af2864d38a43d405702989ae84d11..5b963a843e799a13bcedad89d70a6234f095b909 100644 (file)
@@ -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();
index 325ece1befa1e0355d093e38c68739777f11a708..42c538630c28e8d6a1a9986e51d268c6803105d9 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 void destroy (void)
 {
index bc49e58cb95ddd17ff9f850d2df9835f5b7136b8..a2ce86ab1db5cb1cc83c4e6742cf1806af202de7 100644 (file)
@@ -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)
 {
index 2ecab2335c24999f62eaa024bc71590dd052cee7..8d83a281cd04b5d9b697ef31cef465e39e5ff7b7 100644 (file)
@@ -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)));
 
index d194f918fd0942ca7d74654bda8f9a455bb221b1..03bac84bdbeef9d245940b4848968fee3d06375d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all"  } */
 
 void f1()
 {
index 5d125d0e1b701b3a317a505394a50757cb82e679..e630b6dc14074c592887f2d7c7d40781ab68c58c 100644 (file)
@@ -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;
index 5c02e8ec33603e6e42fb431571c7b39626d767eb..e482bd275d93c2c6742170157bb00bf145fd76af 100644 (file)
@@ -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;
index 788038a1c68c37c5e43234b40d0f3a5e3f70d5f9..b9aea90b4004bedc8b340fa4ac20f24027ca91c0 100644 (file)
@@ -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" }*/
 
index a60721ffbd59c56a4e522580917eb6083b4775c3..83ccd20ac56c820a706f53f4251469e21b37513d 100644 (file)
@@ -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" } */
 
index b2d48f9d79dffbfc7e82008c283015b50d300395..40d71740f653d6faa0a2c0b1a4eae199f6966807 100644 (file)
@@ -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 <complex.h>
index 488e133d93f72a2be7c0ea68a5c3c0e034b20532..87a6d261b3ba2178a22c2bf8e7b750f3b9c71fae 100644 (file)
@@ -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 <complex.h>
index 8ee46d034e712394e875e5cc3ad23d032874920e..fe95c2ccd569a9703d4ab20e44f3a24a493d5b16 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf"  } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized"  } */
 
 #include <stdio.h>
 
index 06958a4d69dc6834e243d2a4c050aa2dfaf76235..f96e8e866a4bb085d2aad3b2e7568373be7cdc7f 100644 (file)
@@ -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.  */
index 79d93af6eb7a903e6d168f13294ec7f3cf7d1443..e2c9121c037a4590855c3df8ee043eb303886532 100644 (file)
@@ -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 <complex.h>
 
index 327cff9dcdde5e0ccb73c9d3ed87c9b0762edb49..d357405bb9a57fcdbf3c6d2b140dbd4fbdb5400b 100644 (file)
@@ -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];