re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins)
[gcc.git] / gcc / ipa-icf.h
index 8ad09df4c8aec2eb4a17b9f80fea5799493e25b6..67d5bdc90c5eb9c7f8ff344b110e5fc1234316e7 100644 (file)
@@ -87,10 +87,10 @@ public:
 
 /* Hash traits for symbol_compare_collection map.  */
 
-struct symbol_compare_hashmap_traits: default_hashmap_traits
+struct symbol_compare_hash : nofree_ptr_hash <symbol_compare_collection>
 {
   static hashval_t
-  hash (const symbol_compare_collection *v)
+  hash (value_type v)
   {
     inchash::hash hstate;
     hstate.add_int (v->m_references.length ());
@@ -107,8 +107,7 @@ struct symbol_compare_hashmap_traits: default_hashmap_traits
   }
 
   static bool
-  equal_keys (const symbol_compare_collection *a,
-             const symbol_compare_collection *b)
+  equal (value_type a, value_type b)
   {
     if (a->m_references.length () != b->m_references.length ()
        || a->m_interposables.length () != b->m_interposables.length ())
@@ -292,7 +291,6 @@ public:
 
   inline virtual void init_wpa (void)
   {
-    parse_tree_args ();
   }
 
   virtual void init (void);
@@ -310,9 +308,6 @@ public:
     dump_function_to_file (decl, file, TDF_DETAILS);
   }
 
-  /* Parses function arguments and result type.  */
-  void parse_tree_args (void);
-
   /* Returns cgraph_node.  */
   inline cgraph_node *get_node (void)
   {
@@ -329,15 +324,13 @@ public:
      semantic function item.  */
   static sem_function *parse (cgraph_node *node, bitmap_obstack *stack);
 
+  /* Perform additional checks needed to match types of used function
+     paramters.  */
+  bool compatible_parm_types_p (tree, tree);
+
   /* Exception handling region tree.  */
   eh_region region_tree;
 
-  /* Result type tree node.  */
-  tree result_type;
-
-  /* Array of argument tree types.  */
-  vec <tree> arg_types;
-
   /* Number of function arguments.  */
   unsigned int arg_count;
 
@@ -380,8 +373,7 @@ private:
   bool compare_edge_flags (cgraph_edge *e1, cgraph_edge *e2);
 
   /* Processes function equality comparison.  */
-  bool equals_private (sem_item *item,
-                      hash_map <symtab_node *, sem_item *> &ignored_nodes);
+  bool equals_private (sem_item *item);
 
   /* Returns true if tree T can be compared as a handled component.  */
   static bool icf_handled_component_p (tree t);
@@ -446,11 +438,8 @@ struct congruence_class_group
 };
 
 /* Congruence class set structure.  */
-struct congruence_class_group_hash: typed_noop_remove <congruence_class_group>
+struct congruence_class_group_hash : nofree_ptr_hash <congruence_class_group>
 {
-  typedef congruence_class_group *value_type;
-  typedef congruence_class_group *compare_type;
-
   static inline hashval_t hash (const congruence_class_group *item)
   {
     return item->hash;