ir_mode *arg_mode;
int nparams, i;
long proj_nr;
- type *mtp;
+ ir_type *mtp;
ptr_access_kind *rw_info;
mtp = get_entity_type(ent);
/* Call algorithm that computes the out edges */
if (get_irg_outs_state(irg) != outs_consistent)
- compute_outs(irg);
+ compute_irg_outs(irg);
irg_args = get_irg_args(irg);
/* copy the temporary info */
memcpy(ent->param_access, rw_info, nparams * sizeof(ent->param_access[0]));
+#if 0
printf("\n%s:\n", get_entity_name(ent));
for (i = 0; i < nparams; ++i) {
if (is_Pointer_type(get_method_param_type(mtp, i)))
printf("\n");
}
}
+#endif
}
/**
*/
ptr_access_kind get_method_param_access(entity *ent, int pos)
{
- type *mtp = get_entity_type(ent);
- int is_variadic = get_method_variadicity(mtp) == variadicity_variadic;
+ ir_type *mtp = get_entity_type(ent);
+ int is_variadic = get_method_variadicity(mtp) == variadicity_variadic;
assert(0 <= pos && (is_variadic || pos < get_method_n_params(mtp)));
*/
static void analyze_method_params_weight(entity *ent)
{
- type *mtp;
+ ir_type *mtp;
ir_graph *irg;
int nparams, i, proj_nr;
ir_node *irg_args, *arg;
mtp = get_entity_type(ent);
nparams = get_method_n_params(mtp);
+ /* allocate a new array. currently used as 'analysed' flag */
+ ent->param_weight = NEW_ARR_F(float, nparams);
+
/* If the method haven't parameters we have
* nothing to do.
*/
if (nparams <= 0)
return;
- ent->param_weight = NEW_ARR_F(float, nparams);
- irg = get_entity_irg(ent);
+ irg = get_entity_irg(ent);
/* First we initialize the parameter weight with 0. */
for (i = nparams - 1; i >= 0; i--)
/* Call algorithm that computes the out edges */
if (get_irg_outs_state(irg) != outs_consistent)
- compute_outs(irg);
+ compute_irg_outs(irg);
irg_args = get_irg_args(irg);
*/
float get_method_param_weight(entity *ent, int pos)
{
- type *mtp = get_entity_type(ent);
- int is_variadic = get_method_variadicity(mtp) == variadicity_variadic;
+ ir_type *mtp = get_entity_type(ent);
+ int is_variadic = get_method_variadicity(mtp) == variadicity_variadic;
assert(0 <= pos && (is_variadic || pos < get_method_n_params(mtp)));