res = (ir_graph *) malloc (sizeof (ir_graph));
memset(res, 0, sizeof (ir_graph));
- res->kind=k_ir_graph;
+ res->kind = k_ir_graph;
/* inform statistics here, as blocks will be already build on this graph */
stat_new_graph(res, ent);
/*-- initialized for each graph. --*/
if (get_opt_precise_exc_context()) {
res->n_loc = n_loc + 1 + 1; /* number of local variables that are never
- dereferenced in this graph plus one for
- the store plus one for links to fragile
- operations. n_loc is not the number of
- parameters to the procedure! */
+ dereferenced in this graph plus one for
+ the store plus one for links to fragile
+ operations. n_loc is not the number of
+ parameters to the procedure! */
}
else {
res->n_loc = n_loc + 1; /* number of local variables that are never
- dereferenced in this graph plus one for
- the store. This is not the number of parameters
- to the procedure! */
+ dereferenced in this graph plus one for
+ the store. This is not the number of parameters
+ to the procedure! */
}
res->visited = 0; /* visited flag, for the ir walker */
- res->block_visited=0; /* visited flag, for the 'block'-walker */
+ res->block_visited = 0; /* visited flag, for the 'block'-walker */
#if USE_EXPLICIT_PHI_IN_STACK
res->Phi_in_stack = new_Phi_in_stack(); /* A stack needed for automatic Phi
res->ent = ent;
set_entity_irg(ent, res);
- /*-- contain "inner" methods as in Pascal. --*/
+ /*-- a class type so that it can contain "inner" methods as in Pascal. --*/
res->frame_type = new_type_class(mangle(get_entity_ident(ent), frame_type_suffix));
/* Remove type from type list. Must be treated differently than other types. */
if (irg->outs_state != no_outs) free_outs(irg);
if (irg->frame_type) free_type(irg->frame_type);
if (irg->value_table) del_identities(irg->value_table);
- if (irg->ent) set_entity_irg(irg->ent, NULL); /* not set in const code irg */
+ if (irg->ent) {
+ peculiarity pec = get_entity_peculiarity (irg->ent);
+ set_entity_peculiarity (irg->ent, peculiarity_description);
+ set_entity_irg(irg->ent, NULL); /* not set in const code irg */
+ set_entity_peculiarity (irg->ent, pec);
+ }
+
free_End(irg->end);
obstack_free(irg->obst,NULL);
free(irg->obst);