hash-table.h: support non-zero empty values in empty_slow (v2)
[gcc.git] / gcc / ipa-prop.c
index c9c6a827d0828b2b75390e80c64fc49e90e9a74f..12cdb95cf2ab7bea181b774af6b2213ec1c76bc8 100644 (file)
@@ -1,5 +1,5 @@
 /* Interprocedural analyses.
-   Copyright (C) 2005-2019 Free Software Foundation, Inc.
+   Copyright (C) 2005-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -78,6 +78,7 @@ struct ipa_bit_ggc_hash_traits : public ggc_cache_remove <ipa_bits *>
     {
       return a->value == b->value && a->mask == b->mask;
     }
+  static const bool empty_zero_p = true;
   static void
   mark_empty (ipa_bits *&p)
     {
@@ -123,6 +124,7 @@ struct ipa_vr_ggc_hash_traits : public ggc_cache_remove <value_range *>
     {
       return a->equal_p (*b);
     }
+  static const bool empty_zero_p = true;
   static void
   mark_empty (value_range *&p)
     {
@@ -1852,8 +1854,9 @@ determine_known_aggregate_parts (struct ipa_func_body_info *fbi,
   tree arg_base;
   bool check_ref, by_ref;
   ao_ref r;
+  int max_agg_items = opt_for_fn (fbi->node->decl, param_ipa_max_agg_items);
 
-  if (param_ipa_max_agg_items == 0)
+  if (max_agg_items == 0)
     return;
 
   /* The function operates in three stages.  First, we prepare check_ref, r,
@@ -1951,14 +1954,14 @@ determine_known_aggregate_parts (struct ipa_func_body_info *fbi,
                 operands, whose definitions can finally reach the call.  */
              add_to_agg_contents_list (&list, (*copy = *content, copy));
 
-             if (++value_count == param_ipa_max_agg_items)
+             if (++value_count == max_agg_items)
                break;
            }
 
          /* Add to the list consisting of all dominating virtual operands.  */
          add_to_agg_contents_list (&all_list, content);
 
-         if (++item_count == 2 * param_ipa_max_agg_items)
+         if (++item_count == 2 * max_agg_items)
            break;
        }
       dom_vuse = gimple_vuse (stmt);
@@ -2876,7 +2879,7 @@ ipa_analyze_node (struct cgraph_node *node)
   fbi.bb_infos = vNULL;
   fbi.bb_infos.safe_grow_cleared (last_basic_block_for_fn (cfun));
   fbi.param_count = ipa_get_param_count (info);
-  fbi.aa_walk_budget = param_ipa_max_aa_steps;
+  fbi.aa_walk_budget = opt_for_fn (node->decl, param_ipa_max_aa_steps);
 
   for (struct cgraph_edge *cs = node->callees; cs; cs = cs->next_callee)
     {
@@ -3294,12 +3297,12 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target,
     {
       dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, ie->call_stmt,
                       "converting indirect call in %s to direct call to %s\n",
-                      ie->caller->name (), callee->name ());
+                      ie->caller->dump_name (), callee->dump_name ());
     }
   if (!speculative)
     {
       struct cgraph_edge *orig = ie;
-      ie = ie->make_direct (callee);
+      ie = cgraph_edge::make_direct (ie, callee);
       /* If we resolved speculative edge the cost is already up to date
         for direct call (adjusted by inline_edge_duplication_hook).  */
       if (ie == orig)
@@ -3489,7 +3492,7 @@ remove_described_reference (symtab_node *symbol, struct ipa_cst_ref_desc *rdesc)
   to_del->remove_reference ();
   if (dump_file)
     fprintf (dump_file, "ipa-prop: Removed a reference from %s to %s.\n",
-            origin->caller->dump_name (), xstrdup_for_dump (symbol->name ()));
+            origin->caller->dump_name (), symbol->dump_name ());
   return true;
 }
 
@@ -5756,7 +5759,7 @@ ipcp_transform_function (struct cgraph_node *node)
   fbi.bb_infos = vNULL;
   fbi.bb_infos.safe_grow_cleared (last_basic_block_for_fn (cfun));
   fbi.param_count = param_count;
-  fbi.aa_walk_budget = param_ipa_max_aa_steps;
+  fbi.aa_walk_budget = opt_for_fn (node->decl, param_ipa_max_aa_steps);
 
   vec_safe_grow_cleared (descriptors, param_count);
   ipa_populate_param_decls (node, *descriptors);