OSDN Git Service

PR c++/51318
[pf3gnuchains/gcc-fork.git] / gcc / ipa-prop.h
index fafd17d..1a609a5 100644 (file)
@@ -72,13 +72,24 @@ along with GCC; see the file COPYING3.  If not see
 enum jump_func_type
 {
   IPA_JF_UNKNOWN = 0,  /* newly allocated and zeroed jump functions default */
-  IPA_JF_KNOWN_TYPE,        /* represented by field base_binfo */
+  IPA_JF_KNOWN_TYPE,        /* represented by field known_type */
   IPA_JF_CONST,             /* represented by field costant */
   IPA_JF_CONST_MEMBER_PTR,  /* represented by field member_cst */
   IPA_JF_PASS_THROUGH,     /* represented by field pass_through */
   IPA_JF_ANCESTOR          /* represented by field ancestor */
 };
 
+/* Structure holding data required to describe a known type jump function.  */
+struct GTY(()) ipa_known_type_data
+{
+  /* Offset of the component of the base_type being described.  */
+  HOST_WIDE_INT offset;
+  /* Type of the whole object.  */
+  tree base_type;
+  /* Type of the component of the object that is being described.  */
+  tree component_type;
+};
+
 /* Structure holding data required to describe a pass-through jump function.  */
 
 struct GTY(()) ipa_pass_through_data
@@ -127,7 +138,7 @@ typedef struct GTY (()) ipa_jump_func
      functions and member_cst holds constant c++ member functions.  */
   union jump_func_value
   {
-    tree GTY ((tag ("IPA_JF_KNOWN_TYPE"))) base_binfo;
+    struct ipa_known_type_data GTY ((tag ("IPA_JF_KNOWN_TYPE"))) known_type;
     tree GTY ((tag ("IPA_JF_CONST"))) constant;
     struct ipa_member_ptr_cst GTY ((tag ("IPA_JF_CONST_MEMBER_PTR"))) member_cst;
     struct ipa_pass_through_data GTY ((tag ("IPA_JF_PASS_THROUGH"))) pass_through;
@@ -282,7 +293,6 @@ void ipa_free_edge_args_substructures (struct ipa_edge_args *);
 void ipa_free_node_params_substructures (struct ipa_node_params *);
 void ipa_free_all_node_params (void);
 void ipa_free_all_edge_args (void);
-void ipa_create_all_structures_for_iinln (void);
 void ipa_free_all_structures_after_ipa_cp (void);
 void ipa_free_all_structures_after_iinln (void);
 void ipa_register_cgraph_hooks (void);
@@ -336,6 +346,9 @@ bool ipa_propagate_indirect_call_infos (struct cgraph_edge *cs,
                                        VEC (cgraph_edge_p, heap) **new_edges);
 
 /* Indirect edge and binfo processing.  */
+tree ipa_get_indirect_edge_target (struct cgraph_edge *ie,
+                                  VEC (tree, heap) *known_csts,
+                                  VEC (tree, heap) *known_binfs);
 struct cgraph_edge *ipa_make_edge_direct_to_target (struct cgraph_edge *, tree);
 
 /* Functions related to both.  */
@@ -427,8 +440,8 @@ void ipa_prop_write_jump_functions (cgraph_node_set set);
 void ipa_prop_read_jump_functions (void);
 void ipa_update_after_lto_read (void);
 int ipa_get_param_decl_index (struct ipa_node_params *, tree);
-tree ipa_cst_from_jfunc (struct ipa_node_params *info,
-                        struct ipa_jump_func *jfunc);
+tree ipa_value_from_jfunc (struct ipa_node_params *info,
+                          struct ipa_jump_func *jfunc);
 
 
 /* From tree-sra.c:  */