summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index acc01fcfbbb..a28ab55097b 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -68,11 +68,11 @@ struct param_analysis_info
};
/* Vector where the parameter infos are actually stored. */
-vec<ipa_node_params_t> ipa_node_params_vector;
+vec<ipa_node_params> ipa_node_params_vector;
/* Vector of known aggregate values in cloned nodes. */
vec<ipa_agg_replacement_value_p, va_gc> *ipa_node_agg_replacements;
/* Vector where the parameter infos are actually stored. */
-vec<ipa_edge_args_t, va_gc> *ipa_edge_args_vector;
+vec<ipa_edge_args, va_gc> *ipa_edge_args_vector;
/* Holders of ipa cgraph hooks: */
static struct cgraph_edge_hook_list *edge_removal_hook_holder;
@@ -116,7 +116,7 @@ ipa_func_spec_opts_forbid_analysis_p (struct cgraph_node *node)
to INFO. */
static int
-ipa_get_param_decl_index_1 (vec<ipa_param_descriptor_t> descriptors, tree ptree)
+ipa_get_param_decl_index_1 (vec<ipa_param_descriptor> descriptors, tree ptree)
{
int i, count;
@@ -142,7 +142,7 @@ ipa_get_param_decl_index (struct ipa_node_params *info, tree ptree)
static void
ipa_populate_param_decls (struct cgraph_node *node,
- vec<ipa_param_descriptor_t> &descriptors)
+ vec<ipa_param_descriptor> &descriptors)
{
tree fndecl;
tree fnargs;
@@ -775,7 +775,7 @@ parm_preserved_before_stmt_p (struct param_analysis_info *parm_ainfo,
modified. Otherwise return -1. */
static int
-load_from_unmodified_param (vec<ipa_param_descriptor_t> descriptors,
+load_from_unmodified_param (vec<ipa_param_descriptor> descriptors,
struct param_analysis_info *parms_ainfo,
gimple stmt)
{
@@ -863,7 +863,7 @@ parm_ref_data_pass_through_p (struct param_analysis_info *parm_ainfo,
reference respectively. */
static bool
-ipa_load_from_parm_agg_1 (vec<ipa_param_descriptor_t> descriptors,
+ipa_load_from_parm_agg_1 (vec<ipa_param_descriptor> descriptors,
struct param_analysis_info *parms_ainfo, gimple stmt,
tree op, int *index_p, HOST_WIDE_INT *offset_p,
HOST_WIDE_INT *size_p, bool *by_ref_p)
@@ -3444,7 +3444,15 @@ ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec adjustments)
if (adj->by_ref)
ptype = build_pointer_type (adj->type);
else
- ptype = adj->type;
+ {
+ ptype = adj->type;
+ if (is_gimple_reg_type (ptype))
+ {
+ unsigned malign = GET_MODE_ALIGNMENT (TYPE_MODE (ptype));
+ if (TYPE_ALIGN (ptype) < malign)
+ ptype = build_aligned_type (ptype, malign);
+ }
+ }
if (care_for_types)
new_arg_types = tree_cons (NULL_TREE, ptype, new_arg_types);
@@ -4688,7 +4696,7 @@ adjust_agg_replacement_values (struct cgraph_node *node,
unsigned int
ipcp_transform_function (struct cgraph_node *node)
{
- vec<ipa_param_descriptor_t> descriptors = vNULL;
+ vec<ipa_param_descriptor> descriptors = vNULL;
struct param_analysis_info *parms_ainfo;
struct ipa_agg_replacement_value *aggval;
gimple_stmt_iterator gsi;
@@ -4717,7 +4725,7 @@ ipcp_transform_function (struct cgraph_node *node)
descriptors.safe_grow_cleared (param_count);
ipa_populate_param_decls (node, descriptors);
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
struct ipa_agg_replacement_value *v;