Hi,

On Mon, Jul 13, 2015 at 03:49:05PM +0200, Richard Biener wrote:
> On Mon, Jul 13, 2015 at 3:46 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
> >
> >
> > On 13/07/2015 15:45, Richard Biener wrote:
> >> It would be nice to have a patch that can be backported to the GCC 5 branch
> >> as well.  We can improve this on trunk as followup,no?
> >
> > The patch I've already posted can be backported. O:-)
> 
> So unless Martin objects consider the patch approved for trunk and for
> backporting
> after 5.2 is released and trunk shows no issues.
> 
> Martin - can you take care of committing if you are fine with it?
> 

I have commitred the patch to trunk (and hopefully will not forget to
backport it once 5 branch reopens).  I am testing the following
hopefully obvious followup, which I plan to commit tomorrow.  It is
just mechanical renaming of the newly exported structures to give them
ipa prefix.

Thanks,

Martin


2015-07-15  Martin Jambor  <mjam...@suse.cz>

        * ipa-prop.h (param_aa_status): Rename to ipa_param_aa_status.  Adjust
        all uses.  Fix two typos in its general comment.
        (func_body_info): Rename to ipa_func_body_info.  Adjust all uses.

diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 81a6860..b79ef14 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -1574,7 +1574,7 @@ unmodified_parm (gimple stmt, tree op)
    loaded.  */
 
 static bool
-unmodified_parm_or_parm_agg_item (struct func_body_info *fbi,
+unmodified_parm_or_parm_agg_item (struct ipa_func_body_info *fbi,
                                  gimple stmt, tree op, int *index_p,
                                  struct agg_position_info *aggpos)
 {
@@ -1745,7 +1745,7 @@ eliminated_by_inlining_prob (gimple stmt)
    predicates to the CFG edges.   */
 
 static void
-set_cond_stmt_execution_predicate (struct func_body_info *fbi,
+set_cond_stmt_execution_predicate (struct ipa_func_body_info *fbi,
                                   struct inline_summary *summary,
                                   basic_block bb)
 {
@@ -1827,7 +1827,7 @@ set_cond_stmt_execution_predicate (struct func_body_info 
*fbi,
    predicates to the CFG edges.   */
 
 static void
-set_switch_stmt_execution_predicate (struct func_body_info *fbi,
+set_switch_stmt_execution_predicate (struct ipa_func_body_info *fbi,
                                     struct inline_summary *summary,
                                     basic_block bb)
 {
@@ -1888,7 +1888,7 @@ set_switch_stmt_execution_predicate (struct 
func_body_info *fbi,
    which it is executable.  */
 
 static void
-compute_bb_predicates (struct func_body_info *fbi,
+compute_bb_predicates (struct ipa_func_body_info *fbi,
                       struct cgraph_node *node,
                       struct inline_summary *summary)
 {
@@ -2031,7 +2031,7 @@ will_be_nonconstant_expr_predicate (struct 
ipa_node_params *info,
    a compile time constant.  */
 
 static struct predicate
-will_be_nonconstant_predicate (struct func_body_info *fbi,
+will_be_nonconstant_predicate (struct ipa_func_body_info *fbi,
                               struct inline_summary *summary,
                               gimple stmt,
                               vec<predicate_t> nonconstant_names)
@@ -2481,7 +2481,7 @@ estimate_function_body_sizes (struct cgraph_node *node, 
bool early)
   int freq;
   struct inline_summary *info = inline_summaries->get (node);
   struct predicate bb_predicate;
-  struct func_body_info fbi;
+  struct ipa_func_body_info fbi;
   vec<predicate_t> nonconstant_names = vNULL;
   int nblocks, n;
   int *order;
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 615f749..2815ca6 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -481,7 +481,7 @@ ipa_set_ancestor_jf (struct ipa_jump_func *jfunc, 
HOST_WIDE_INT offset,
    of this function body.  */
 
 static struct ipa_bb_info *
-ipa_get_bb_info (struct func_body_info *fbi, basic_block bb)
+ipa_get_bb_info (struct ipa_func_body_info *fbi, basic_block bb)
 {
   gcc_checking_assert (fbi);
   return &fbi->bb_infos[bb->index];
@@ -756,7 +756,7 @@ mark_modified (ao_ref *ao ATTRIBUTE_UNUSED, tree vdef 
ATTRIBUTE_UNUSED,
    should really just start giving up.  */
 
 static bool
-aa_overwalked (struct func_body_info *fbi)
+aa_overwalked (struct ipa_func_body_info *fbi)
 {
   gcc_checking_assert (fbi);
   return fbi->aa_walked > (unsigned) PARAM_VALUE (PARAM_IPA_MAX_AA_STEPS);
@@ -765,8 +765,8 @@ aa_overwalked (struct func_body_info *fbi)
 /* Find the nearest valid aa status for parameter specified by INDEX that
    dominates BB.  */
 
-static struct param_aa_status *
-find_dominating_aa_status (struct func_body_info *fbi, basic_block bb,
+static struct ipa_param_aa_status *
+find_dominating_aa_status (struct ipa_func_body_info *fbi, basic_block bb,
                           int index)
 {
   while (true)
@@ -785,21 +785,21 @@ find_dominating_aa_status (struct func_body_info *fbi, 
basic_block bb,
    structures and/or intialize the result with a dominating description as
    necessary.  */
 
-static struct param_aa_status *
-parm_bb_aa_status_for_bb (struct func_body_info *fbi, basic_block bb,
+static struct ipa_param_aa_status *
+parm_bb_aa_status_for_bb (struct ipa_func_body_info *fbi, basic_block bb,
                          int index)
 {
   gcc_checking_assert (fbi);
   struct ipa_bb_info *bi = ipa_get_bb_info (fbi, bb);
   if (bi->param_aa_statuses.is_empty ())
     bi->param_aa_statuses.safe_grow_cleared (fbi->param_count);
-  struct param_aa_status *paa = &bi->param_aa_statuses[index];
+  struct ipa_param_aa_status *paa = &bi->param_aa_statuses[index];
   if (!paa->valid)
     {
       gcc_checking_assert (!paa->parm_modified
                           && !paa->ref_modified
                           && !paa->pt_modified);
-      struct param_aa_status *dom_paa;
+      struct ipa_param_aa_status *dom_paa;
       dom_paa = find_dominating_aa_status (fbi, bb, index);
       if (dom_paa)
        *paa = *dom_paa;
@@ -816,10 +816,10 @@ parm_bb_aa_status_for_bb (struct func_body_info *fbi, 
basic_block bb,
    gathered but do not survive the summary building stage.  */
 
 static bool
-parm_preserved_before_stmt_p (struct func_body_info *fbi, int index,
+parm_preserved_before_stmt_p (struct ipa_func_body_info *fbi, int index,
                              gimple stmt, tree parm_load)
 {
-  struct param_aa_status *paa;
+  struct ipa_param_aa_status *paa;
   bool modified = false;
   ao_ref refd;
 
@@ -855,7 +855,7 @@ parm_preserved_before_stmt_p (struct func_body_info *fbi, 
int index,
    modified.  Otherwise return -1.  */
 
 static int
-load_from_unmodified_param (struct func_body_info *fbi,
+load_from_unmodified_param (struct ipa_func_body_info *fbi,
                            vec<ipa_param_descriptor> descriptors,
                            gimple stmt)
 {
@@ -882,10 +882,10 @@ load_from_unmodified_param (struct func_body_info *fbi,
    before reaching statement STMT.  */
 
 static bool
-parm_ref_data_preserved_p (struct func_body_info *fbi,
+parm_ref_data_preserved_p (struct ipa_func_body_info *fbi,
                           int index, gimple stmt, tree ref)
 {
-  struct param_aa_status *paa;
+  struct ipa_param_aa_status *paa;
   bool modified = false;
   ao_ref refd;
 
@@ -921,7 +921,7 @@ parm_ref_data_preserved_p (struct func_body_info *fbi,
    CALL into which it is passed.  FBI describes the function body.  */
 
 static bool
-parm_ref_data_pass_through_p (struct func_body_info *fbi, int index,
+parm_ref_data_pass_through_p (struct ipa_func_body_info *fbi, int index,
                              gimple call, tree parm)
 {
   bool modified = false;
@@ -935,8 +935,9 @@ parm_ref_data_pass_through_p (struct func_body_info *fbi, 
int index,
       || aa_overwalked (fbi))
     return false;
 
-  struct param_aa_status *paa = parm_bb_aa_status_for_bb (fbi, gimple_bb 
(call),
-                                                         index);
+  struct ipa_param_aa_status *paa = parm_bb_aa_status_for_bb (fbi,
+                                                             gimple_bb (call),
+                                                             index);
   if (paa->pt_modified)
     return false;
 
@@ -960,7 +961,7 @@ parm_ref_data_pass_through_p (struct func_body_info *fbi, 
int index,
    reference respectively.  */
 
 bool
-ipa_load_from_parm_agg (struct func_body_info *fbi,
+ipa_load_from_parm_agg (struct ipa_func_body_info *fbi,
                        vec<ipa_param_descriptor> descriptors,
                        gimple stmt, tree op, int *index_p,
                        HOST_WIDE_INT *offset_p, HOST_WIDE_INT *size_p,
@@ -1085,7 +1086,7 @@ ipa_load_from_parm_agg (struct func_body_info *fbi,
    only needed for intraprocedural analysis.  */
 
 static void
-compute_complex_assign_jump_func (struct func_body_info *fbi,
+compute_complex_assign_jump_func (struct ipa_func_body_info *fbi,
                                  struct ipa_node_params *info,
                                  struct ipa_jump_func *jfunc,
                                  gcall *call, gimple stmt, tree name,
@@ -1227,7 +1228,7 @@ get_ancestor_addr_info (gimple assign, tree *obj_p, 
HOST_WIDE_INT *offset)
      return D.1879_6;  */
 
 static void
-compute_complex_ancestor_jump_func (struct func_body_info *fbi,
+compute_complex_ancestor_jump_func (struct ipa_func_body_info *fbi,
                                    struct ipa_node_params *info,
                                    struct ipa_jump_func *jfunc,
                                    gcall *call, gphi *phi)
@@ -1609,7 +1610,7 @@ ipa_get_callee_param_type (struct cgraph_edge *e, int i)
    to this callsite.  */
 
 static void
-ipa_compute_jump_functions_for_edge (struct func_body_info *fbi,
+ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi,
                                     struct cgraph_edge *cs)
 {
   struct ipa_node_params *info = IPA_NODE_REF (cs->caller);
@@ -1732,7 +1733,7 @@ ipa_compute_jump_functions_for_edge (struct 
func_body_info *fbi,
    from BB.  */
 
 static void
-ipa_compute_jump_functions_for_bb (struct func_body_info *fbi, basic_block bb)
+ipa_compute_jump_functions_for_bb (struct ipa_func_body_info *fbi, basic_block 
bb)
 {
   struct ipa_bb_info *bi = ipa_get_bb_info (fbi, bb);
   int i;
@@ -1895,7 +1896,7 @@ ipa_note_param_call (struct cgraph_node *node, int 
param_index,
    passed by value or reference.  */
 
 static void
-ipa_analyze_indirect_call_uses (struct func_body_info *fbi, gcall *call,
+ipa_analyze_indirect_call_uses (struct ipa_func_body_info *fbi, gcall *call,
                                tree target)
 {
   struct ipa_node_params *info = fbi->info;
@@ -2033,7 +2034,7 @@ ipa_analyze_indirect_call_uses (struct func_body_info 
*fbi, gcall *call,
    statement.  */
 
 static void
-ipa_analyze_virtual_call_uses (struct func_body_info *fbi,
+ipa_analyze_virtual_call_uses (struct ipa_func_body_info *fbi,
                               gcall *call, tree target)
 {
   tree obj = OBJ_TYPE_REF_OBJECT (target);
@@ -2090,7 +2091,7 @@ ipa_analyze_virtual_call_uses (struct func_body_info *fbi,
    containing intermediate information about each formal parameter.  */
 
 static void
-ipa_analyze_call_uses (struct func_body_info *fbi, gcall *call)
+ipa_analyze_call_uses (struct ipa_func_body_info *fbi, gcall *call)
 {
   tree target = gimple_call_fn (call);
 
@@ -2136,7 +2137,7 @@ ipa_analyze_call_uses (struct func_body_info *fbi, gcall 
*call)
    formal parameters are called.  */
 
 static void
-ipa_analyze_stmt_uses (struct func_body_info *fbi, gimple stmt)
+ipa_analyze_stmt_uses (struct ipa_func_body_info *fbi, gimple stmt)
 {
   if (is_gimple_call (stmt))
     ipa_analyze_call_uses (fbi, as_a <gcall *> (stmt));
@@ -2169,7 +2170,7 @@ visit_ref_for_mod_analysis (gimple, tree op, tree, void 
*data)
    the function being analyzed.  */
 
 static void
-ipa_analyze_params_uses_in_bb (struct func_body_info *fbi, basic_block bb)
+ipa_analyze_params_uses_in_bb (struct ipa_func_body_info *fbi, basic_block bb)
 {
   gimple_stmt_iterator gsi;
   for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
@@ -2251,13 +2252,13 @@ free_ipa_bb_info (struct ipa_bb_info *bi)
 class analysis_dom_walker : public dom_walker
 {
 public:
-  analysis_dom_walker (struct func_body_info *fbi)
+  analysis_dom_walker (struct ipa_func_body_info *fbi)
     : dom_walker (CDI_DOMINATORS), m_fbi (fbi) {}
 
   virtual void before_dom_children (basic_block);
 
 private:
-  struct func_body_info *m_fbi;
+  struct ipa_func_body_info *m_fbi;
 };
 
 void
@@ -2274,7 +2275,7 @@ analysis_dom_walker::before_dom_children (basic_block bb)
 void
 ipa_analyze_node (struct cgraph_node *node)
 {
-  struct func_body_info fbi;
+  struct ipa_func_body_info fbi;
   struct ipa_node_params *info;
 
   ipa_check_create_node_params ();
@@ -5078,7 +5079,7 @@ adjust_agg_replacement_values (struct cgraph_node *node,
 class ipcp_modif_dom_walker : public dom_walker
 {
 public:
-  ipcp_modif_dom_walker (struct func_body_info *fbi,
+  ipcp_modif_dom_walker (struct ipa_func_body_info *fbi,
                         vec<ipa_param_descriptor> descs,
                         struct ipa_agg_replacement_value *av,
                         bool *sc, bool *cc)
@@ -5088,7 +5089,7 @@ public:
   virtual void before_dom_children (basic_block);
 
 private:
-  struct func_body_info *m_fbi;
+  struct ipa_func_body_info *m_fbi;
   vec<ipa_param_descriptor> m_descriptors;
   struct ipa_agg_replacement_value *m_aggval;
   bool *m_something_changed, *m_cfg_changed;
@@ -5246,7 +5247,7 @@ unsigned int
 ipcp_transform_function (struct cgraph_node *node)
 {
   vec<ipa_param_descriptor> descriptors = vNULL;
-  struct func_body_info fbi;
+  struct ipa_func_body_info fbi;
   struct ipa_agg_replacement_value *aggval;
   int param_count;
   bool cfg_changed = false, something_changed = false;
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index a6b26b8..47d31ac 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -338,10 +338,10 @@ struct ipa_node_params
 
 /* Intermediate information that we get from alias analysis about a particular
    parameter in a particular basic_block.  When a parameter or the memory it
-   references is marked modified, we use that information in all dominatd
-   blocks without cosulting alias analysis oracle.  */
+   references is marked modified, we use that information in all dominated
+   blocks without consulting alias analysis oracle.  */
 
-struct param_aa_status
+struct ipa_param_aa_status
 {
   /* Set when this structure contains meaningful information.  If not, the
      structure describing a dominating BB should be used instead.  */
@@ -363,13 +363,13 @@ struct ipa_bb_info
   /* Call graph edges going out of this BB.  */
   vec<cgraph_edge *> cg_edges;
   /* Alias analysis statuses of each formal parameter at this bb.  */
-  vec<param_aa_status> param_aa_statuses;
+  vec<ipa_param_aa_status> param_aa_statuses;
 };
 
 /* Structure with global information that is only used when looking at function
    body. */
 
-struct func_body_info
+struct ipa_func_body_info
 {
   /* The node that is being analyzed.  */
   cgraph_node *node;
@@ -636,7 +636,7 @@ void ipa_analyze_node (struct cgraph_node *);
 /* Aggregate jump function related functions.  */
 tree ipa_find_agg_cst_for_param (struct ipa_agg_jump_function *, HOST_WIDE_INT,
                                 bool);
-bool ipa_load_from_parm_agg (struct func_body_info *,
+bool ipa_load_from_parm_agg (struct ipa_func_body_info *,
                             vec<ipa_param_descriptor>, gimple, tree, int *,
                             HOST_WIDE_INT *, HOST_WIDE_INT *, bool *);
 

Reply via email to