aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2015-07-16 11:48:20 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2015-07-16 11:48:20 +0200
commit56b400624349b998a808ebc3ded750a517e696bb (patch)
tree5b5cc325877cdf22a400393b822592970f48472a /gcc/ipa-prop.c
parent6de59c8aaa0b850738ae6f5413ef81a1720a1f06 (diff)
downloadgcc-56b400624349b998a808ebc3ded750a517e696bb.zip
gcc-56b400624349b998a808ebc3ded750a517e696bb.tar.gz
gcc-56b400624349b998a808ebc3ded750a517e696bb.tar.bz2
Give struct param_aa_atatus and struct func_body_info an ipa_ prefix.
2015-07-16 Martin Jambor <mjambor@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. From-SVN: r225867
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c65
1 files changed, 33 insertions, 32 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 77fc6b5..34e4826 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -479,7 +479,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];
@@ -754,7 +754,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);
@@ -763,8 +763,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)
@@ -783,21 +783,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;
@@ -814,10 +814,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;
@@ -853,7 +853,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)
{
@@ -880,10 +880,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;
@@ -919,7 +919,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;
@@ -933,8 +933,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;
@@ -958,7 +959,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,
@@ -1083,7 +1084,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,
@@ -1225,7 +1226,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)
@@ -1607,7 +1608,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);
@@ -1730,7 +1731,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;
@@ -1893,7 +1894,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;
@@ -2031,7 +2032,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);
@@ -2088,7 +2089,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);
@@ -2134,7 +2135,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));
@@ -2167,7 +2168,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))
@@ -2249,13 +2250,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
@@ -2272,7 +2273,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 ();
@@ -5076,7 +5077,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)
@@ -5086,7 +5087,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;
@@ -5244,7 +5245,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;