OSDN Git Service

* sdbout.c: Include vec.h, do not include varray.h.
[pf3gnuchains/gcc-fork.git] / gcc / ipa-reference.c
index cc790fd..2617072 100644 (file)
@@ -352,9 +352,9 @@ static bool
 mark_address (gimple stmt ATTRIBUTE_UNUSED, tree addr,
              void *data ATTRIBUTE_UNUSED)
 {
-  while (handled_component_p (addr))
-    addr = TREE_OPERAND (addr, 0);
-  mark_address_taken (addr);
+  addr = get_base_address (addr);
+  if (addr)
+    mark_address_taken (addr);
   return false;
 }
 
@@ -364,7 +364,8 @@ static bool
 mark_load (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data)
 {
   ipa_reference_local_vars_info_t local = (ipa_reference_local_vars_info_t)data;
-  if (TREE_CODE (t) == VAR_DECL
+  t = get_base_address (t);
+  if (t && TREE_CODE (t) == VAR_DECL
       && has_proper_scope_for_analysis (t))
     bitmap_set_bit (local->statics_read, DECL_UID (t));
   return false;
@@ -376,7 +377,8 @@ static bool
 mark_store (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data)
 {
   ipa_reference_local_vars_info_t local = (ipa_reference_local_vars_info_t)data;
-  if (TREE_CODE (t) == VAR_DECL
+  t = get_base_address (t);
+  if (t && TREE_CODE (t) == VAR_DECL
       && has_proper_scope_for_analysis (t))
     {
       if (local)
@@ -1038,7 +1040,8 @@ write_node_summary_p (struct cgraph_node *node)
 /* Serialize the ipa info for lto.  */
 
 static void
-ipa_reference_write_summary (cgraph_node_set set)
+ipa_reference_write_summary (cgraph_node_set set,
+                            varpool_node_set vset ATTRIBUTE_UNUSED)
 {
   struct cgraph_node *node;
   struct lto_simple_output_block *ob
@@ -1512,7 +1515,8 @@ struct ipa_opt_pass_d pass_ipa_reference =
  generate_summary,                     /* generate_summary */
  ipa_reference_write_summary,          /* write_summary */
  ipa_reference_read_summary,           /* read_summary */
- NULL,                                 /* function_read_summary */
+ NULL,                                 /* write_optimization_summary */
+ NULL,                                 /* read_optimization_summary */
  NULL,                                 /* stmt_fixup */
  0,                                    /* TODOs */
  NULL,                                 /* function_transform */