* cause cycles we don't want to see, as Unknwon is in the Start Block
* or the procedure. Use unknown of outermost irg where the start
* block has no predecessors. */
-static INLINE ir_node *get_cg_Unknown(void) {
+static INLINE ir_node *get_cg_Unknown(ir_mode *m) {
assert((get_Block_n_cfgpreds(get_irg_start_block(get_irp_main_irg())) == 1) &&
(get_nodes_block(get_Block_cfgpred(get_irg_start_block(get_irp_main_irg()), 0)) ==
get_irg_start_block(get_irp_main_irg())));
- return get_irg_unknown(get_irp_main_irg());
+ return new_r_Unknown(get_irp_main_irg(), m);
}
/* Unbekannten Aufrufer sofort eintragen. */
if (data->open) {
- set_Block_cg_cfgpred(start_block, 0, get_cg_Unknown());
+ set_Block_cg_cfgpred(start_block, 0, get_cg_Unknown(mode_X));
for (proj = get_irn_link(get_irg_start(irg)); proj; proj = get_irn_link(proj)) {
if (get_irn_op(proj) == op_Filter) {
- set_Filter_cg_pred(proj, 0, get_cg_Unknown());
+ set_Filter_cg_pred(proj, 0, get_cg_Unknown(get_irn_mode(proj)));
}
}
data->count = 1;
/* "frame_base" wird nur durch Unknown dargestellt. Man kann ihn aber
* auch explizit darstellen, wenn sich daraus Vorteile für die
* Datenflussanalyse ergeben. */
- set_Filter_cg_pred(filter, data->count, get_cg_Unknown());
+ set_Filter_cg_pred(filter, data->count, get_cg_Unknown(get_irn_mode(filter)));
break;
case pns_globals:
/* "globals" wird nur durch Unknown dargestellt. Man kann ihn aber auch
* explizit darstellen, wenn sich daraus Vorteile für die
* Datenflussanalyse ergeben. */
- set_Filter_cg_pred(filter, data->count, get_cg_Unknown());
+ set_Filter_cg_pred(filter, data->count, get_cg_Unknown(get_irn_mode(filter)));
break;
default:
/* not reached */
in[i] = new_Bad();
}
} else { /* unknown */
- in[i] = get_cg_Unknown();
+ in[i] = get_cg_Unknown(mode_M);
}
}
}
in[i] = new_Bad();
}
} else { /* unknown */
- in[i] = get_cg_Unknown();
+ in[i] = get_cg_Unknown(mode_M);
}
}
}
/* Abhängigkeiten für ein Ergebnis über alle aufgerufenen Methoden
* bestimmen. */
-static void fill_result(int pos, int length, irg_data_t * data[], ir_node * in[]) {
+static void fill_result(int pos, int length, irg_data_t * data[], ir_node * in[], ir_mode *m) {
int i;
for (i = 0; i < length; ++i) {
if (data[i]) { /* explicit */
in[i] = new_Bad();
}
} else { /* unknown */
- in[i] = get_cg_Unknown();
+ in[i] = get_cg_Unknown(m);
}
}
}
in[i] = new_Bad();
}
} else { /* unknown */
- in[i] = get_cg_Unknown();
+ in[i] = get_cg_Unknown(mode_X);
}
}
set_interprocedural_view(0);
in[i] = new_Bad();
}
} else { /* unknown */
- in[i] = get_cg_Unknown();
+ in[i] = get_cg_Unknown(mode_X);
}
}
set_irn_link(filter, get_irn_link(post_block));
set_irn_link(post_block, filter);
}
- fill_result(get_Proj_proj(filter), n_callees, data, in);
+ fill_result(get_Proj_proj(filter), n_callees, data, in, get_irn_mode(filter));
set_Filter_cg_pred_arr(filter, n_callees, in);
}
}
}
INLINE ir_node *
-new_rd_Unknown (ir_graph *irg)
+new_rd_Unknown (ir_graph *irg, ir_mode *m)
{
- return irg->unknown;
+ return new_ir_node (NULL, irg, irg->start_block, op_Unknown, m, 0, NULL);
}
INLINE ir_node *
INLINE ir_node *new_r_Confirm (ir_graph *irg, ir_node *block, ir_node *val, ir_node *bound, pn_Cmp cmp) {
return new_rd_Confirm (NULL, irg, block, val, bound, cmp);
}
-INLINE ir_node *new_r_Unknown (ir_graph *irg) {
- return new_rd_Unknown(irg);
+INLINE ir_node *new_r_Unknown (ir_graph *irg, ir_mode *m) {
+ return new_rd_Unknown(irg, m);
}
INLINE ir_node *new_r_CallBegin (ir_graph *irg, ir_node *block, ir_node *callee) {
return new_rd_CallBegin(NULL, irg, block, callee);
}
ir_node *
-new_d_Unknown (void)
+new_d_Unknown (ir_mode *m)
{
- return current_ir_graph->unknown;
+ return new_rd_Unknown(current_ir_graph, m);
}
ir_node *
ir_node *new_Confirm (ir_node *val, ir_node *bound, pn_Cmp cmp) {
return new_d_Confirm (NULL, val, bound, cmp);
}
-ir_node *new_Unknown(void) {
- return new_d_Unknown();
+ir_node *new_Unknown(ir_mode *m) {
+ return new_d_Unknown(m);
}
ir_node *new_CallBegin (ir_node *callee) {
return new_d_CallBegin(NULL, callee);
ir_node *new_rd_Bad (ir_graph *irg);
ir_node *new_rd_Confirm (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *val, ir_node *bound, pn_Cmp cmp);
-ir_node *new_rd_Unknown(ir_graph *irg);
+ir_node *new_rd_Unknown(ir_graph *irg, ir_mode *m);
ir_node *new_rd_CallBegin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *callee);
ir_node *new_rd_EndReg (dbg_info *db, ir_graph *irg, ir_node *block);
ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block);
ir_node *new_r_Bad (ir_graph *irg);
ir_node *new_r_Confirm (ir_graph *irg, ir_node *block,
ir_node *val, ir_node *bound, pn_Cmp cmp);
-ir_node *new_r_Unknown(ir_graph *irg);
+ir_node *new_r_Unknown(ir_graph *irg, ir_mode *m);
ir_node *new_r_CallBegin(ir_graph *irg, ir_node *block, ir_node *callee);
ir_node *new_r_EndReg (ir_graph *irg, ir_node *block);
ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block);
ir_node *new_d_Id (dbg_info* db, ir_node *val, ir_mode *mode);
ir_node *new_d_Bad (void);
ir_node *new_d_Confirm (dbg_info* db, ir_node *val, ir_node *bound, pn_Cmp cmp);
-ir_node *new_d_Unknown(void);
+ir_node *new_d_Unknown(ir_mode *m);
ir_node *new_d_CallBegin(dbg_info *db, ir_node *callee);
ir_node *new_d_EndReg (dbg_info *db);
ir_node *new_d_EndExcept(dbg_info *db);
ir_node *new_Id (ir_node *val, ir_mode *mode);
ir_node *new_Bad (void);
ir_node *new_Confirm (ir_node *val, ir_node *bound, pn_Cmp cmp);
-ir_node *new_Unknown(void);
+ir_node *new_Unknown(ir_mode *m);
/*---------------------------------------------------------------------*/
/* The comfortable interface. */
copy_preds(get_irg_bad(current_ir_graph), NULL);
}
set_irg_bad(current_ir_graph, get_new_node(get_irg_bad(current_ir_graph)));
+ /* GL removed: we need unknown with mode for analyses.
if (get_irn_link(get_irg_unknown(current_ir_graph)) == NULL) {
copy_node(get_irg_unknown(current_ir_graph), NULL);
copy_preds(get_irg_unknown(current_ir_graph), NULL);
}
set_irg_unknown(current_ir_graph, get_new_node(get_irg_unknown(current_ir_graph)));
+ */
}
/* Copies all reachable nodes to a new obstack. Removes bad inputs
res->start_block = new_immBlock ();
res->start = new_Start ();
res->bad = new_ir_node (NULL, res, res->start_block, op_Bad, mode_T, 0, NULL);
- res->unknown = new_ir_node (NULL, res, res->start_block, op_Unknown, mode_T, 0, NULL);
+ //res->unknown = new_ir_node (NULL, res, res->start_block, op_Unknown, mode_T, 0, NULL);
/* Proj results of start node */
projX = new_Proj (res->start, mode_X, pns_initial_exec);
res->end = new_End ();
mature_block(get_cur_block());
res->bad = new_ir_node (NULL, res, res->start_block, op_Bad, mode_T, 0, NULL);
- res->unknown = new_ir_node (NULL, res, res->start_block, op_Unknown, mode_T, 0, NULL);
+ //res->unknown = new_ir_node (NULL, res, res->start_block, op_Unknown, mode_T, 0, NULL);
res->start = new_Start ();
/* Proj results of start node */
irg->bad = node;
}
+/* GL removed: we need unknown with mode for analyses.
ir_node *
get_irg_unknown (ir_graph *irg)
{
{
irg->unknown = node;
}
+*/
ir_node *
get_irg_current_block (ir_graph *irg)
void set_irg_bad (ir_graph *irg, ir_node *node);
/* Use new_Unknown() instead!! */
+/* GL removed: we need unknown with mode for analyses.
ir_node *get_irg_unknown (ir_graph *irg);
void set_irg_unknown (ir_graph *irg, ir_node *node);
+*/
int get_irg_n_locs (ir_graph *irg);
struct ir_node *args; /**< methods arguments */
struct ir_node *bad; /**< bad node of this ir_graph, the one and
only in this graph */
- struct ir_node *unknown; /**< unknown node of this ir_graph */
+ /* GL removed: we need unknown with mode for analyses. */
+ // struct ir_node *unknown; /**< unknown node of this ir_graph */
struct obstack *obst; /**< obstack where all of the ir_nodes live */
struct ir_node *current_block; /**< block for newly gen_*()-erated
ir_nodes */
void add_irp_irg(ir_graph *irg);
/** Removes irg from the list of irgs, deallocates it and
- shrinks the list by one. */
+ shrinks the list by one. */
void remove_irp_irg(ir_graph *irg);
/** Returns the number of ir graphs in the irp. */
if (opcode != iro_Phi && opcode != iro_Block)
for (i = 0; i < get_irn_arity(n); i++) {
opcode1 = get_irn_opcode(get_irn_n(n, i));
- if (opcode1 == iro_Bad || opcode1 == iro_Unknown)
+ if (opcode1 == iro_Bad /*|| opcode1 == iro_Unknown*/) /* GL: for analyses mode must be correct. */
return 1;
}
/* Returns true if the the node is representable as code on
* const_code_irg. */
int is_irn_const_expression(ir_node *n) {
- ir_node *pred;
ir_mode *m;
m = get_irn_mode(n);
case iro_Conv:
nn = new_Conv(copy_const_value(get_Conv_op(n)), m); break;
case iro_Unknown:
- nn = new_Unknown(); break;
+ nn = new_Unknown(m); break;
default:
DDMN(n);
assert(0 && "opdope invalid or not implemented");
allocation_dynamic, /**< The entity is allocated during runtime, explicitly
by an Alloc node. */
allocation_static /**< The entity is allocated statically. We can use a
- SymConst(?) as address of the entity. */
+ Const as address of the entity. */
} ent_allocation;
/** Returns the allocation type of an entity. */
/** Sets the allocation type of an entity. */
void set_entity_allocation (entity *ent, ent_allocation al);
-/** Return the name of the visibility */
+/** Return the name of the allocation type. */
const char *get_allocation_name(ent_allocation vis);
/**
current_ir_graph = get_const_code_irg();
for (i = 0; i < n_dimensions; i++) {
- res->attr.aa.lower_bound[i] = new_Unknown();
- res->attr.aa.upper_bound[i] = new_Unknown();
+ res->attr.aa.lower_bound[i] = new_Unknown(mode_Iu);
+ res->attr.aa.upper_bound[i] = new_Unknown(mode_Iu);
res->attr.aa.order[i] = i;
}
current_ir_graph = rem;