static void add_method_address(entity *ent, eset *set)
{
ir_node *n;
- type *tp;
+ ir_type *tp;
int i;
/* do not check uninitialized values */
entity **arr = NEW_ARR_F(entity *, 0);
entity *ent;
ir_graph *irg;
- type *glob;
+ ir_type *glob;
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
irg = get_irp_irg(i);
return cost_loop*(cost_method + cost_rec);
}
-double get_type_estimated_n_instances(type *tp) {
+double get_type_estimated_n_instances(ir_type *tp) {
int i, n_allocs = get_type_n_allocs(tp);
double n_instances = 0;
for (i = 0; i < n_allocs; ++i) {
return n_instances;
}
-double get_type_estimated_mem_consumption_bytes(type *tp) {
+double get_type_estimated_mem_consumption_bytes(ir_type *tp) {
assert(0);
return 0.0;
}
-int get_type_estimated_n_fields(type *tp) {
+int get_type_estimated_n_fields(ir_type *tp) {
int s = 0;
switch(get_type_tpop_code(tp)) {
return s;
}
-int get_type_estimated_size_bytes(type *tp) {
+int get_type_estimated_size_bytes(ir_type *tp) {
int s = 0;
switch(get_type_tpop_code(tp)) {
return s;
}
-double get_type_estimated_n_casts(type *tp) {
+double get_type_estimated_n_casts(ir_type *tp) {
int i, n_casts = get_type_n_casts(tp);
double n_instances = 0;
for (i = 0; i < n_casts; ++i) {
return n_instances;
}
-double get_class_estimated_n_upcasts(type *clss) {
+double get_class_estimated_n_upcasts(ir_type *clss) {
double n_instances = 0;
int i, j, n_casts, n_pointertypes;
return n_instances;
}
-double get_class_estimated_n_downcasts(type *clss) {
+double get_class_estimated_n_downcasts(ir_type *clss) {
double n_instances = 0;
int i, j, n_casts, n_pointertypes;
}
-double get_class_estimated_dispatch_writes(type *clss) {
+double get_class_estimated_dispatch_writes(ir_type *clss) {
return get_type_estimated_n_instances(clss);
}
/** Returns the number of reads of the dispatch pointer. */
-double get_class_estimated_dispatch_reads (type *clss) {
+double get_class_estimated_dispatch_reads (ir_type *clss) {
int i, n_mems = get_class_n_members(clss);
double n_calls = 0;
for (i = 0; i < n_mems; ++i) {
return n_calls;
}
-double get_class_estimated_n_dyncalls(type *clss) {
+double get_class_estimated_n_dyncalls(ir_type *clss) {
return get_class_estimated_dispatch_reads(clss) +
get_class_estimated_dispatch_writes(clss);
}
}
-int is_jack_rts_class(type *t) {
+int is_jack_rts_class(ir_type *t) {
ident *name = get_type_ident(t);
return is_jack_rts_name(name);
}
if (! c) {
ir_mode *mode = get_irn_mode(irn);
- type *tp = get_irn_type(irn);
+ ir_type *tp = get_irn_type(irn);
tarval *tv = new_tarval_from_long(nr, mode);
c = new_r_Const_type(current_ir_graph, block, mode, tv, tp);
}
#define VERBOSE_UNKNOWN_TYPE(s) printf s
-static type *phi_cycle_type = NULL;
+static ir_type *phi_cycle_type = NULL;
/* ------------ Building and Removing the type information ----------- */
set_type_link(get_irp_type(i), (void *)firm_unknown_type);
for (i = get_irp_n_types() - 1; i >= 0; --i) {
- type *tp = get_irp_type(i);
+ ir_type *tp = get_irp_type(i);
if (is_Pointer_type(tp))
set_type_link(get_pointer_points_to_type(tp), (void *)tp);
}
* Returns a pointer to type which was stored in the link field
* to speed up search.
*/
-static type *find_pointer_type_to (type *tp) {
+static ir_type *find_pointer_type_to (ir_type *tp) {
#if 0
- return (type *)get_type_link(tp);
+ return (ir_type *)get_type_link(tp);
#else
if (get_type_n_pointertypes_to(tp) > 0)
return get_type_pointertype_to(tp, 0);
#endif
}
-static type *compute_irn_type(ir_node *n);
+static ir_type *compute_irn_type(ir_node *n);
-static type *find_type_for_Proj(ir_node *n) {
- type *tp;
+static ir_type *find_type_for_Proj(ir_node *n) {
+ ir_type *tp;
/* Avoid nested Tuples. */
ir_node *pred = skip_Tuple(get_Proj_pred(n));
assert(get_irn_mode(pred) == mode_T);
pred_pred = get_Proj_pred(pred);
if (get_irn_op(pred_pred) == op_Start) {
- type *mtp = get_entity_type(get_irg_entity(get_irn_irg(pred_pred)));
+ ir_type *mtp = get_entity_type(get_irg_entity(get_irn_irg(pred_pred)));
tp = get_method_param_type(mtp, get_Proj_proj(n));
} else if (get_irn_op(pred_pred) == op_Call) {
- type *mtp = get_Call_type(pred_pred);
+ ir_type *mtp = get_Call_type(pred_pred);
tp = get_method_res_type(mtp, get_Proj_proj(n));
} else if (get_irn_op(pred_pred) == op_Tuple) {
assert(0 && "Encountered nested Tuple");
* Try to determine the type of a node.
* If a type cannot be determined, return @p firm_none_type.
*/
-static type *find_type_for_node(ir_node *n) {
- type *tp = NULL;
- type *tp1 = NULL, *tp2 = NULL;
+static ir_type *find_type_for_node(ir_node *n) {
+ ir_type *tp = NULL;
+ ir_type *tp1 = NULL, *tp2 = NULL;
ir_node *a = NULL, *b = NULL;
/* DDMN(n); */
/* Check returned type. */
/*
int i;
- type *meth_type = get_entity_type(get_irg_entity(current_ir_graph));
+ ir_type *meth_type = get_entity_type(get_irg_entity(current_ir_graph));
for (i = 0; i < get_method_n_ress(meth_type); i++) {
- type *res_type = get_method_res_type(meth_type, i);
- type *ana_res_type = get_irn_type(get_Return_res(n, i));
+ ir_type *res_type = get_method_res_type(meth_type, i);
+ ir_type *ana_res_type = get_irn_type(get_Return_res(n, i));
if (ana_res_type == firm_unknown_type) continue;
if (res_type != ana_res_type && "return value has wrong type") {
DDMN(n);
}
-static type *compute_irn_type(ir_node *n) {
- type *tp = get_irn_typeinfo_type(n);
+static ir_type *compute_irn_type(ir_node *n) {
+ ir_type *tp = get_irn_typeinfo_type(n);
if (tp == initial_type) {
tp = find_type_for_node(n);
static void compute_type(ir_node *n, void *env) {
- type *tp = get_irn_typeinfo_type(n);
+ ir_type *tp = get_irn_typeinfo_type(n);
if (tp == phi_cycle_type) {
/* printf(" recomputing for phi_cycle_type "); DDMN(n); */
set_irn_typeinfo_type(n, initial_type);
* variable is set by init_irtypeinfo. The type is freed by
* free_irtypeinfo.
*/
-type *initial_type = NULL;
+ir_type *initial_type = NULL;
/* ------------ Initializing this module. ----------------------------- */
* ir_typeinfo_consistent or ir_typeinfo_inconsistent. They
* assume current_ir_graph set properly.
*/
-type *get_irn_typeinfo_type(ir_node *n) {
- type *res = initial_type;
+ir_type *get_irn_typeinfo_type(ir_node *n) {
+ ir_type *res = initial_type;
assert(get_irg_typeinfo_state(get_irn_irg(n)) == ir_typeinfo_consistent ||
get_irg_typeinfo_state(get_irn_irg(n)) == ir_typeinfo_inconsistent );
if (pmap_contains(type_node_map, (void *)n))
- res = (type *) pmap_get(type_node_map, (void *)n);
+ res = (ir_type *) pmap_get(type_node_map, (void *)n);
return res;
}
-void set_irn_typeinfo_type(ir_node *n, type *tp) {
+void set_irn_typeinfo_type(ir_node *n, ir_type *tp) {
assert(get_irg_typeinfo_state(current_ir_graph) == ir_typeinfo_consistent ||
get_irg_typeinfo_state(current_ir_graph) == ir_typeinfo_inconsistent );
return (FALSE);
}
-static int add_class (type *clazz)
+static int add_class (ir_type *clazz)
{
if (!eset_contains (_live_classes, clazz)) {
if (verbose > 1) {
}
} else if (iro_Alloc == op) { /* ALLOC */
- type *type = get_Alloc_type (node);
+ ir_type *type = get_Alloc_type (node);
*change |= add_class (type);
}
/* Find static allocated classes */
for (i = 0; i < n_globs; ++i) {
- type *member_type = get_entity_type(get_class_member(get_glob_type(), i));
+ ir_type *member_type = get_entity_type(get_class_member(get_glob_type(), i));
if (is_Class_type(member_type))
eset_insert(_live_classes, member_type);
}
}
/* Say whether this class might be instantiated at any point in the program: */
-int rta_is_alive_class (type *clazz)
+int rta_is_alive_class (ir_type *clazz)
{
return (eset_contains (_live_classes, clazz));
}
int i;
for (i = 0; i < get_irp_n_types(); ++i) {
- type *tp = get_irp_type(i);
+ ir_type *tp = get_irp_type(i);
if (is_Class_type(tp) && rta_is_alive_class(tp)) {
fprintf(stdout, "RTA: considered allocated: "); DDMT(tp);
}
/*
* $Log$
+ * Revision 1.35 2006/01/13 21:51:59 beck
+ * renamed all types 'type' to 'ir_type'
+ *
* Revision 1.34 2006/01/02 15:01:16 beck
* missing include added
*
void rta_cleanup(void);
/** Returns non-zero if the given class is alive. */
-int rta_is_alive_class(type *clazz);
+int rta_is_alive_class(ir_type *clazz);
/** Returns non-zero if the given graph is alive. */
int rta_is_alive_graph(ir_graph *graph);
/*
* $Log$
+ * Revision 1.14 2006/01/13 21:52:00 beck
+ * renamed all types 'type' to 'ir_type'
+ *
* Revision 1.13 2004/10/21 07:23:34 goetz
* comments
*
pmap_insert(entity_reference_map, (void *)ent, (void *)refs);
}
-static ir_node **get_type_alloc_array(type *tp) {
+static ir_node **get_type_alloc_array(ir_type *tp) {
ir_node **res;
if (!type_alloc_map) type_alloc_map = pmap_create();
return res;
}
-void set_type_alloc_array(type *tp, ir_node **alls) {
+void set_type_alloc_array(ir_type *tp, ir_node **alls) {
ir_node **old = pmap_get(type_alloc_map, (void *)tp);
if (old != alls)
pmap_insert(type_alloc_map, (void *)tp, (void *)alls);
}
-static ir_node **get_type_cast_array(type *tp) {
+static ir_node **get_type_cast_array(ir_type *tp) {
ir_node **res;
if (!type_cast_map) type_cast_map = pmap_create();
return res;
}
-void set_type_cast_array(type *tp, ir_node **alls) {
+void set_type_cast_array(ir_type *tp, ir_node **alls) {
ir_node **old = pmap_get(type_cast_map, (void *)tp);
if (old != alls)
pmap_insert(type_cast_map, (void *)tp, (void *)alls);
}
-static type **get_type_pointertype_array(type *tp) {
- type **res;
+static ir_type **get_type_pointertype_array(ir_type *tp) {
+ ir_type **res;
if (!type_pointertype_map) type_pointertype_map = pmap_create();
if (pmap_contains(type_pointertype_map, (void *)tp)) {
- res = (type **) pmap_get(type_pointertype_map, (void *)tp);
+ res = (ir_type **) pmap_get(type_pointertype_map, (void *)tp);
} else {
- res = NEW_ARR_F(type *, 0);
+ res = NEW_ARR_F(ir_type *, 0);
pmap_insert(type_pointertype_map, (void *)tp, (void *)res);
}
return res;
}
-void set_type_pointertype_array(type *tp, type **pts) {
- type **old = pmap_get(type_pointertype_map, (void *)tp);
+void set_type_pointertype_array(ir_type *tp, ir_type **pts) {
+ ir_type **old = pmap_get(type_pointertype_map, (void *)tp);
if (old != pts)
pmap_insert(type_pointertype_map, (void *)tp, (void *)pts);
}
-static type **get_type_arraytype_array(type *tp) {
- type **res;
+static ir_type **get_type_arraytype_array(ir_type *tp) {
+ ir_type **res;
if (!type_arraytype_map) type_arraytype_map = pmap_create();
if (pmap_contains(type_arraytype_map, (void *)tp)) {
- res = (type **) pmap_get(type_arraytype_map, (void *)tp);
+ res = (ir_type **) pmap_get(type_arraytype_map, (void *)tp);
} else {
- res = NEW_ARR_F(type *, 0);
+ res = NEW_ARR_F(ir_type *, 0);
pmap_insert(type_arraytype_map, (void *)tp, (void *)res);
}
return res;
}
-void set_type_arraytype_array(type *tp, type **pts) {
- type **old = pmap_get(type_arraytype_map, (void *)tp);
+void set_type_arraytype_array(ir_type *tp, ir_type **pts) {
+ ir_type **old = pmap_get(type_arraytype_map, (void *)tp);
if (old != pts)
pmap_insert(type_arraytype_map, (void *)tp, (void *)pts);
}
/**------------------------------------------------------------------*/
/* Number of Alloc nodes that create an instance of this type */
-int get_type_n_allocs(type *tp) {
+int get_type_n_allocs(ir_type *tp) {
ir_node **allocs;
assert(tp && is_type(tp));
}
/* Alloc node that creates an instance of this type */
-ir_node *get_type_alloc(type *tp, int pos) {
+ir_node *get_type_alloc(ir_type *tp, int pos) {
ir_node **allocs;
assert(0 <= pos && pos < get_type_n_allocs(tp));
return allocs[pos];
}
-void add_type_alloc(type *tp, ir_node *n) {
+void add_type_alloc(ir_type *tp, ir_node *n) {
ir_node **allocs;
assert(tp && is_type(tp));
set_type_alloc_array(tp, allocs);
}
-void set_type_alloc(type *tp, int pos, ir_node *n) {
+void set_type_alloc(ir_type *tp, int pos, ir_node *n) {
ir_node **allocs;
assert(0 <= pos && pos < get_type_n_allocs(tp));
}
/* Number of Cast nodes that create an instance of this type */
-int get_type_n_casts(type *tp) {
+int get_type_n_casts(ir_type *tp) {
ir_node **casts;
assert(tp && is_type(tp));
}
-int get_class_n_upcasts(type *clss) {
+int get_class_n_upcasts(ir_type *clss) {
int i, n_casts = get_type_n_casts(clss);
int n_instances = 0;
for (i = 0; i < n_casts; ++i) {
return n_instances;
}
-int get_class_n_downcasts(type *clss) {
+int get_class_n_downcasts(ir_type *clss) {
int i, n_casts = get_type_n_casts(clss);
int n_instances = 0;
for (i = 0; i < n_casts; ++i) {
/* Cast node that creates an instance of this type */
-ir_node *get_type_cast(type *tp, int pos) {
+ir_node *get_type_cast(ir_type *tp, int pos) {
ir_node **casts;
assert(0 <= pos && pos < get_type_n_casts(tp));
return casts[pos];
}
-void add_type_cast(type *tp, ir_node *n) {
+void add_type_cast(ir_type *tp, ir_node *n) {
ir_node **casts;
assert(tp && is_type(tp));
set_type_cast_array(tp, casts);
}
-void set_type_cast(type *tp, int pos, ir_node *n) {
+void set_type_cast(ir_type *tp, int pos, ir_node *n) {
ir_node **casts;
assert(0 <= pos && pos < get_type_n_casts(tp));
/**------------------------------------------------------------------*/
-int get_type_n_pointertypes_to(type *tp) {
- type ** pts;
+int get_type_n_pointertypes_to(ir_type *tp) {
+ ir_type ** pts;
assert(tp && is_type(tp));
return ARR_LEN(pts);
}
-type *get_type_pointertype_to(type *tp, int pos) {
- type ** pts;
+ir_type *get_type_pointertype_to(ir_type *tp, int pos) {
+ ir_type ** pts;
assert(0 <= pos && pos < get_type_n_pointertypes_to(tp));
return pts[pos];
}
-void add_type_pointertype_to(type *tp, type *ptp) {
- type ** pts;
+void add_type_pointertype_to(ir_type *tp, ir_type *ptp) {
+ ir_type ** pts;
assert(tp && is_type(tp));
assert(ptp && is_Pointer_type(ptp));
set_type_pointertype_array(tp, pts);
}
-void set_type_pointertype_to(type *tp, int pos, type *ptp) {
- type ** pts;
+void set_type_pointertype_to(ir_type *tp, int pos, ir_type *ptp) {
+ ir_type ** pts;
assert(0 <= pos && pos < get_type_n_pointertypes_to(tp));
assert(ptp && is_Pointer_type(ptp));
/**------------------------------------------------------------------*/
-int get_type_n_arraytypes_of(type *tp) {
- type ** pts;
+int get_type_n_arraytypes_of(ir_type *tp) {
+ ir_type ** pts;
assert(tp && is_type(tp));
return ARR_LEN(pts);
}
-type *get_type_arraytype_of(type *tp, int pos) {
- type ** pts;
+ir_type *get_type_arraytype_of(ir_type *tp, int pos) {
+ ir_type ** pts;
assert(0 <= pos && pos < get_type_n_arraytypes_of(tp));
return pts[pos];
}
-void add_type_arraytype_of(type *tp, type *atp) {
- type ** pts;
+void add_type_arraytype_of(ir_type *tp, ir_type *atp) {
+ ir_type ** pts;
assert(tp && is_type(tp));
assert(atp && is_Array_type(atp));
set_type_arraytype_array(tp, pts);
}
-void set_type_arraytype_of(type *tp, int pos, type *atp) {
- type ** pts;
+void set_type_arraytype_of(ir_type *tp, int pos, ir_type *atp) {
+ ir_type ** pts;
assert(0 <= pos && pos < get_type_n_arraytypes_of(tp));
assert(atp && is_Array_type(atp));
}
}
-static void chain_types(type *tp) {
+static void chain_types(ir_type *tp) {
if (is_Pointer_type(tp)) {
add_type_pointertype_to(get_pointer_points_to_type(tp), tp);
} else if (is_Array_type(tp)) {
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/** Number of Alloc nodes that create an instance of this type. */
-int get_type_n_allocs(type *tp);
+int get_type_n_allocs(ir_type *tp);
/** Alloc node that create an instance of this type. */
-ir_node *get_type_alloc(type *tp, int pos);
+ir_node *get_type_alloc(ir_type *tp, int pos);
/** Number of Cast nodes that cast a pointer to this type. */
-int get_type_n_casts(type *tp);
+int get_type_n_casts(ir_type *tp);
/** Cast node that cast a pointer to this type. */
-ir_node *get_type_cast(type *tp, int pos);
-void add_type_cast(type *tp, ir_node *cast);
+ir_node *get_type_cast(ir_type *tp, int pos);
+void add_type_cast(ir_type *tp, ir_node *cast);
/** Return number of upcasts. O(#casts). */
-int get_class_n_upcasts(type *clss);
+int get_class_n_upcasts(ir_type *clss);
/** Return number of downcasts. O(#casts). */
-int get_class_n_downcasts(type *clss);
+int get_class_n_downcasts(ir_type *clss);
/* Access all pointer types that point to tp. */
-int get_type_n_pointertypes_to(type *tp);
-type *get_type_pointertype_to(type *tp, int pos);
-void add_type_pointertype_to(type *tp, type *ptp);
+int get_type_n_pointertypes_to(ir_type *tp);
+ir_type *get_type_pointertype_to(ir_type *tp, int pos);
+void add_type_pointertype_to(ir_type *tp, ir_type *ptp);
/* Access all array types that contain elements of type tp.
* Does not find subarrays, e.g., int[] being element of int[][]
* for multi dimensional arrays. */
-int get_type_n_arraytypes_of(type *tp);
-type *get_type_arraytype_of(type *tp, int pos);
-void add_type_arraytype_of(type *tp, type *atp);
+int get_type_n_arraytypes_of(ir_type *tp);
+ir_type *get_type_arraytype_of(ir_type *tp, int pos);
+void add_type_arraytype_of(ir_type *tp, ir_type *atp);
/*
Exception b/d
*/
-static type *java_lang_Throwable_tp = NULL;
+static ir_type *java_lang_Throwable_tp = NULL;
-static type *get_java_lang_Throwable (void)
+static ir_type *get_java_lang_Throwable (void)
{
assert (NULL != java_lang_Throwable_tp);
return (java_lang_Throwable_tp);
}
-static void find_java_lang_Throwable (type *tp, void *_unused)
+static void find_java_lang_Throwable (ir_type *tp, void *_unused)
{
const char *name = get_type_name (tp);
/*
Ctors, Dtors for typalise_t-s
*/
-static typalise_t *ta_exact (type *tp)
+static typalise_t *ta_exact (ir_type *tp)
{
typalise_t *ta = xmalloc (sizeof (typalise_t));
ta->kind = type_exact;
return (ta);
}
-static typalise_t *ta_type (type *tp)
+static typalise_t *ta_type (ir_type *tp)
{
typalise_t *ta = xmalloc (sizeof (typalise_t));
ta->kind = type_type;
Find out whether otype is a subtype of stype.
Return non-zero iff otype is a subtype of stype.
*/
-static int is_subtype (type *otype, type *stype)
+static int is_subtype (ir_type *otype, ir_type *stype)
{
int n_sub = get_class_n_subtypes (stype);
int is_sub = FALSE;
}
for (i = 0; (!is_sub) && (i < n_sub); i ++) {
- type *sub = get_class_subtype (stype, i);
+ ir_type *sub = get_class_subtype (stype, i);
is_sub |= is_subtype (otype, sub);
}
Compute the closure of all subtypes of otype (including otype
itself)
*/
-static void _collect_subtypes (type *otype, lset_t *set)
+static void _collect_subtypes (ir_type *otype, lset_t *set)
{
int i, n_sub;
n_sub = get_class_n_subtypes (otype);
for (i = 0; i < n_sub; i ++) {
- type *sub = get_class_subtype (otype, i);
+ ir_type *sub = get_class_subtype (otype, i);
_collect_subtypes (sub, set);
}
}
-static lset_t *subtype_closure (type *otype)
+static lset_t *subtype_closure (ir_type *otype)
{
lset_t *set = lset_create ();
/**
Return a list containing all types of 'set' which are a subtype of 'type'.
*/
-static lset_t *filter_for_type (lset_t *set, type *stype)
+static lset_t *filter_for_type (lset_t *set, ir_type *stype)
{
- type *curs = (type*) lset_first (set);
+ ir_type *curs = (ir_type*) lset_first (set);
lset_t *lset = lset_create ();
while (NULL != curs) {
res = ta_join (two, one);
} break;
case (type_type): {
- type *one_type = one->res.type;
- type *two_type = two->res.type;
+ ir_type *one_type = one->res.type;
+ ir_type *two_type = two->res.type;
if (is_subtype (one_type, two_type)) {
ta_delete (one);
case (type_types): {
len += sprintf (buf+len, "one_of ");
- type *iter = lset_first (ta->res.types);
+ ir_type *iter = lset_first (ta->res.types);
int size = BUF_SIZE - len - 1;
while ((NULL != iter) && (0 < size)) {
method. Presumably, this is because clazz inherits the graph as
the implementation for a method.
*/
-static int uses_graph (type *clazz, entity *meth, ir_graph *graph)
+static int uses_graph (ir_type *clazz, entity *meth, ir_graph *graph)
{
- type *g_clazz = get_entity_owner (meth);
+ ir_type *g_clazz = get_entity_owner (meth);
int i, n_over, use = FALSE;
if (g_clazz == clazz) {
}
case (type_type): {
entity *meth = get_irg_entity (graph);
- type *tp = get_entity_owner (meth);
+ ir_type *tp = get_entity_owner (meth);
int res = is_subtype (tp, ta->res.type);
if (res) {
return (res);
}
case (type_types): {
- type *tp = get_entity_owner (get_irg_entity (graph));
+ ir_type *tp = get_entity_owner (get_irg_entity (graph));
return (lset_contains (ta->res.types, tp));
}
static typalise_t *typalise_call (ir_node *call)
{
entity *ent = NULL;
- type *tp = NULL;
+ ir_type *tp = NULL;
typalise_t *res = NULL;
ir_node *call_ptr = get_Call_ptr (call);
static typalise_t *typalise_load (ir_node *load)
{
entity *ent = NULL;
- type *tp = NULL;
+ ir_type *tp = NULL;
typalise_t *res = NULL;
ir_node *load_ptr = get_Load_ptr (load);
entity *meth = get_irg_entity (graph);
long n = get_Proj_proj (proj);
- type *tp = get_method_param_type (get_entity_type (meth), n);
+ ir_type *tp = get_method_param_type (get_entity_type (meth), n);
if (is_Pointer_type (tp)) {
tp = get_pointer_points_to_type (tp);
}
case (iro_Cast): {
/* casts always succeed */
typalise_t *ta = NULL;
- type *tp = get_Cast_type (node);
+ ir_type *tp = get_Cast_type (node);
if (is_Pointer_type (tp)) {
tp = get_pointer_points_to_type (tp);
/* FILTER */
/* it's call (sel (ptr)) or load (sel (ptr)) */
entity *ent = get_Sel_entity (node);
- type *tp = get_entity_type (ent);
+ ir_type *tp = get_entity_type (ent);
if (is_Method_type (tp)) {
/* obsoleted by typalise_call */
} break;
case (iro_Alloc): {
- type *type = get_Alloc_type (node);
+ ir_type *type = get_Alloc_type (node);
res = ta_exact (type);
} break;
}
if (NULL != meth) {
- type *tp = get_method_res_type ((type*) meth, 0);
+ ir_type *tp = get_method_res_type ((ir_type*) meth, 0);
res = ta_type (tp);
} else {
/* could be anything */
case (iro_SymConst): {
if (get_SymConst_kind (node) == symconst_type_tag) {
- type *tp = get_SymConst_type (node);
+ ir_type *tp = get_SymConst_type (node);
res = ta_type (tp);
} else if (get_SymConst_kind (node) == symconst_addr_ent) {
entity *ent = get_SymConst_entity (node);
- type *tp = get_entity_owner (ent);
+ ir_type *tp = get_entity_owner (ent);
while (is_Pointer_type (tp)) {
tp = get_pointer_points_to_type (tp);
\f
/*
$Log$
+ Revision 1.12 2006/01/13 21:54:02 beck
+ renamed all types 'type' to 'ir_type'
+
Revision 1.11 2005/05/13 16:35:14 beck
made (void) prototypes
removed unused fprintf arguments
{
typalise_kind kind;
union {
- type *type; /* for kind == kind_exact and kind == kind_type */
+ ir_type *type; /* for kind == kind_exact and kind == kind_type */
lset_t *types; /* for kind == kind_types */
} res;
int id;
\f
/*
$Log$
+ Revision 1.4 2006/01/13 21:54:03 beck
+ renamed all types 'type' to 'ir_type'
+
Revision 1.3 2005/03/22 13:56:09 liekweg
"small" fix for exception b/d
void print_type_counts(int verbosity) {
int i, counter, total = 0;
for (i = 0; i < get_irp_n_types(); i++) {
- type *tp = get_irp_type(i);
+ ir_type *tp = get_irp_type(i);
counter = -1;
if (is_Class_type(tp)) counter = get_class_n_members(tp);
if (is_Struct_type(tp)) counter = get_struct_n_members(tp);