Commit dddcc630 authored by Beyhan's avatar Beyhan
Browse files

normalized names of functions, enums ...

added suffix as argument to dumpers, removed global variable
removed support for tarval/Const

[r3694]
parent c1f3ac50
......@@ -80,10 +80,7 @@ static entity *get_inherited_methods_implementation(entity *inh_meth) {
entity *impl_meth = NULL;
ir_node *addr = get_atomic_ent_value(inh_meth);
assert(addr && "constant entity without value");
if (get_irn_op(addr) == op_Const) {
impl_meth = get_tarval_entity(get_Const_tarval(addr));
} else if ((get_irn_op(addr) == op_SymConst) &&
if ((get_irn_op(addr) == op_SymConst) &&
(get_SymConst_kind(addr) == symconst_addr_ent)) {
impl_meth = get_SymConst_entity(addr);
} else {
......@@ -232,7 +229,7 @@ static void sel_methods_walker(ir_node * node, pmap * ldname_map) {
symconst_symbol sym;
assert(get_entity_irg(ent));
sym.entity_p = ent;
set_irg_current_block(current_ir_graph, get_nodes_Block(node));
set_irg_current_block(current_ir_graph, get_nodes_block(node));
new_node = new_d_SymConst(get_irn_dbg_info(node), sym, symconst_addr_ent); DBG_OPT_NORMALIZE;
DDMN(new_node);
exchange(node, new_node);
......@@ -249,14 +246,14 @@ static void sel_methods_walker(ir_node * node, pmap * ldname_map) {
/* We know which method will be called, no dispatch necessary. */
#if 0
assert(get_entity_peculiarity(ent) != peculiarity_description);
set_irg_current_block(current_ir_graph, get_nodes_Block(node));
set_irg_current_block(current_ir_graph, get_nodes_block(node));
/* @@@ Is this correct?? Alloc could reference a subtype of the owner
of Sel that overwrites the method referenced in Sel. */
/* @@@ Yes, this is wrong. GL, 10.3.04 */
new_node = copy_const_value(get_atomic_ent_value(ent)); DBG_OPT_POLY_ALLOC;
#else
called_ent = resolve_ent_polymorphy(get_Alloc_type(skip_Proj(get_Sel_ptr(node))), ent);
set_irg_current_block(current_ir_graph, get_nodes_Block(node));
set_irg_current_block(current_ir_graph, get_nodes_block(node));
/* called_ent may not be description: has no Address/Const to Call! */
assert(get_entity_peculiarity(called_ent) != peculiarity_description);
new_node = copy_const_value(get_atomic_ent_value(called_ent)); DBG_OPT_POLY_ALLOC;
......@@ -281,8 +278,8 @@ static void sel_methods_walker(ir_node * node, pmap * ldname_map) {
/* @@@ GL Methode um Fehler anzuzeigen aufrufen! */
printf("WARNING: Calling method description %s\n in method %s\n of class %s\n which has "
"no implementation!\n", get_entity_name(ent),
get_entity_name(get_irg_ent(current_ir_graph)),
get_type_name(get_entity_owner(get_irg_ent(current_ir_graph))));
get_entity_name(get_irg_entity(current_ir_graph)),
get_type_name(get_entity_owner(get_irg_entity(current_ir_graph))));
printf("This happens when compiling a Java Interface that's never really used, i.e., "
"no class implementing the interface is ever used.\n");
} else {
......@@ -294,7 +291,7 @@ static void sel_methods_walker(ir_node * node, pmap * ldname_map) {
#if 0
int i;
printf("\nCall site "); DDMN(node);
printf(" in "); DDME(get_irg_ent(current_ir_graph));
printf(" in "); DDME(get_irg_entity(current_ir_graph));
printf(" can call:\n");
for (i = 0; i < ARR_LEN(arr); i++) {
printf(" - "); DDME(arr[i]);
......@@ -310,7 +307,7 @@ static void sel_methods_walker(ir_node * node, pmap * ldname_map) {
* interne Methode zurckgeben. Wir knnen daher die
* Sel-Operation durch eine Const- bzw. SymConst-Operation
* ersetzen. */
set_irg_current_block(current_ir_graph, get_nodes_Block(node));
set_irg_current_block(current_ir_graph, get_nodes_block(node));
/* assert(get_entity_peculiarity(tarval_to_entity(get_Const_tarval(get_atomic_ent_value(arr[0])))) == peculiarity_existent); */
new_node = copy_const_value(get_atomic_ent_value(arr[0])); DBG_OPT_POLY;
exchange (node, new_node);
......@@ -330,7 +327,7 @@ static void sel_methods_init(void) {
assert(entities == NULL);
entities = eset_create();
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
entity * ent = get_irg_ent(get_irp_irg(i));
entity * ent = get_irg_entity(get_irp_irg(i));
/* Nur extern sichtbare Methode knnen berhaupt mit SymConst
* aufgerufen werden. */
if (get_entity_visibility(ent) != visibility_local) {
......@@ -471,23 +468,6 @@ static void callee_ana_node(ir_node * node, eset * methods) {
eset_insert(methods, MARK); /* free method -> unknown */
}
break;
case iro_Const: {
/* interne Methode */
entity * ent = get_tarval_entity(get_Const_tarval(node));
assert(ent && is_method_type(get_entity_type(ent)));
if (get_entity_visibility(ent) != visibility_external_allocated) {
if (!get_entity_irg(ent)) {
dump_entity(ent);
assert(get_entity_irg(ent));
}
eset_insert(methods, ent);
} else {
eset_insert(methods, MARK); /* free method -> unknown */
}
break;
}
case iro_Sel:
/* polymorphe Methode */
for (i = get_Sel_n_methods(node) - 1; i >= 0; --i) {
......@@ -539,7 +519,7 @@ static void callee_walker(ir_node * call, void * env) {
eset * methods = eset_create();
entity * ent;
entity ** arr = NEW_ARR_F(entity *, 0);
callee_ana_node(skip_nop(get_Call_ptr(call)), methods);
callee_ana_node(skip_Id(get_Call_ptr(call)), methods);
if (eset_contains(methods, MARK)) { /* unknown method */
ARR_APP1(entity *, arr, NULL);
}
......@@ -665,16 +645,7 @@ static void free_mark(ir_node * node, eset * set) {
/* nothing: SymConst points to extern method */
}
break;
case iro_Const: {
tarval * val = get_Const_tarval(node);
if (tarval_is_entity(val)) { /* filter null pointer */
entity * ent = get_tarval_entity(val);
if (is_method_type(get_entity_type(ent))) {
eset_insert(set, ent);
}
}
break;
}
case iro_Phi:
for (i = get_Phi_n_preds(node) - 1; i >= 0; --i) {
free_mark(get_Phi_pred(node, i), set);
......@@ -753,7 +724,7 @@ static entity ** get_free_methods(int whole)
if (! whole) {
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
ir_graph * irg = get_irp_irg(i);
entity * ent = get_irg_ent(irg);
entity * ent = get_irg_entity(irg);
/* insert "external visible" methods. */
if (get_entity_visibility(ent) != visibility_local) {
eset_insert(set, ent);
......@@ -767,7 +738,7 @@ static entity ** get_free_methods(int whole)
/* insert sticky methods, too */
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
ir_graph * irg = get_irp_irg(i);
entity * ent = get_irg_ent(irg);
entity * ent = get_irg_entity(irg);
/* insert "external visible" methods. */
if (get_entity_stickyness (ent) == stickyness_sticky) {
eset_insert(set, ent);
......@@ -777,7 +748,7 @@ static entity ** get_free_methods(int whole)
/* Hauptprogramm ist auch dann frei, wenn es nicht "external
* visible" ist. */
if (get_irp_main_irg()) {
eset_insert(set, get_irg_ent(get_irp_main_irg()));
eset_insert(set, get_irg_entity(get_irp_main_irg()));
}
/* Wandle Menge in Feld um. Effizienter. */
for (ent = eset_first(set); ent; ent = eset_next(set)) {
......@@ -842,7 +813,7 @@ void opt_call_addrs(void) {
assert(entities == NULL);
entities = eset_create();
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
entity * ent = get_irg_ent(get_irp_irg(i));
entity * ent = get_irg_entity(get_irp_irg(i));
/* Nur extern sichtbare Methoden knnen berhaupt mit SymConst
* aufgerufen werden. */
if (get_entity_visibility(ent) != local) {
......
......@@ -274,7 +274,7 @@ static bool is_outermost_StartBlock(ir_node *n) {
assert(is_Block(n));
if ((get_Block_n_cfgpreds(n) == 1) &&
(get_irn_op(skip_Proj(get_Block_cfgpred(n, 0))) == op_Start) &&
(get_nodes_Block(skip_Proj(get_Block_cfgpred(n, 0))) == n)) {
(get_nodes_block(skip_Proj(get_Block_cfgpred(n, 0))) == n)) {
return true;
}
return false;
......
......@@ -215,7 +215,7 @@ void compute_doms(ir_graph *irg) {
/* Step 2 */
irn_arity = get_irn_arity(w->block);
for (j = 0; j < irn_arity; j++) {
ir_node *pred = get_nodes_Block(get_Block_cfgpred(w->block, j));
ir_node *pred = get_nodes_block(get_Block_cfgpred(w->block, j));
tmp_dom_info *u;
if ((is_Bad(get_Block_cfgpred(w->block, j))) ||
......@@ -267,7 +267,7 @@ void compute_doms(ir_graph *irg) {
void free_dom_and_peace(ir_graph *irg) {
/* Update graph state */
assert(get_irg_phase_state(current_ir_graph) != phase_building);
current_ir_graph->dom_state = no_dom;
current_ir_graph->dom_state = dom_none;
/* With the implementation right now there is nothing to free,
but better call it anyways... */
......
......@@ -65,7 +65,7 @@ void set_Block_pre_num(ir_node *bl, int num);
*/
void compute_doms(ir_graph *irg);
/** Frees the dominator datastructures. Sets the flag in irg to "no_dom". */
/** Frees the dominator datastructures. Sets the flag in irg to "dom_none". */
void free_dom_and_peace(ir_graph *irg);
#endif /* _IRDOM_H_ */
......@@ -139,7 +139,7 @@ void irg_out_walk(ir_node *node,
irg_walk_func *pre, irg_walk_func *post,
void *env) {
assert(node);
if (get_irg_outs_state(current_ir_graph) != no_outs) {
if (get_irg_outs_state(current_ir_graph) != outs_none) {
inc_irg_visited (current_ir_graph);
irg_out_walk_2(node, pre, post, env);
}
......@@ -290,7 +290,7 @@ void compute_outs(ir_graph *irg) {
/* Update graph state */
assert(get_irg_phase_state(current_ir_graph) != phase_building);
if (current_ir_graph->outs_state != no_outs) free_outs(current_ir_graph);
if (current_ir_graph->outs_state != outs_none) free_outs(current_ir_graph);
current_ir_graph->outs_state = outs_consistent;
/* This first iteration counts the overall number of out edges and the
......@@ -453,7 +453,7 @@ void compute_ip_outs(void) {
assert(get_irp_ip_view_state() == ip_view_valid &&
"Cannot construct outs for invalid ip view.");
if (irp->outs_state != no_outs) {
if (irp->outs_state != outs_none) {
free_ip_outs();
}
......@@ -470,14 +470,14 @@ void free_ip_outs(void)
free(out_edges);
set_irp_ip_outedges(NULL);
}
irp->outs_state = no_outs;
irp->outs_state = outs_none;
}
void free_outs(ir_graph *irg) {
/* current_ir_graph->outs_state = no_outs; */
irg->outs_state = no_outs;
/* current_ir_graph->outs_state = outs_none; */
irg->outs_state = outs_none;
if (irg->outs) {
#ifdef DEBUG_libfirm
......
......@@ -36,7 +36,7 @@
/** To iterate through the successors iterate from 0 to i < get_irn_outs(). No
order of successors guaranteed. Will return edges from block to floating
nodes even if irgraph is in state "floats". */
nodes even if irgraph is in state "op_pin_state_floats". */
/* returns the number of successors of the node: */
int get_irn_n_outs (ir_node *node);
......@@ -79,11 +79,11 @@ void irg_out_block_walk(ir_node *node,
/** Computes the out edges. Sets a flag in irg to "outs_consistent". If the
graph is changed this flag must be set to "outs_inconsistent". Computes
out edges from block to floating nodes even if graph is in state
"floats". Optimizes Tuple nodes. */
"op_pin_state_floats". Optimizes Tuple nodes. */
void compute_outs(ir_graph *irg);
/** Computes the out edges in interprocedural view */
void compute_ip_outs(void);
/** Frees the out datastructures. Sets the flag in irg to "no_outs". */
/** Frees the out datastructures. Sets the flag in irg to "outs_none". */
void free_ip_outs(void);
void free_outs(ir_graph *irg);
......
......@@ -522,7 +522,7 @@ init_node (ir_node *n, void *env) {
(get_irn_op(cb) == op_EndReg) ||
(get_irn_op(cb) == op_EndExcept)) {
init_node(cb, NULL);
init_node(get_nodes_Block(cb), NULL);
init_node(get_nodes_block(cb), NULL);
}
}
#endif
......@@ -561,7 +561,7 @@ static bool is_outermost_Start(ir_node *n) {
if ((get_irn_op(n) == op_Block) &&
(get_Block_n_cfgpreds(n) == 1) &&
(get_irn_op(skip_Proj(get_Block_cfgpred(n, 0))) == op_Start) &&
(get_nodes_Block(skip_Proj(get_Block_cfgpred(n, 0))) == n)) {
(get_nodes_block(skip_Proj(get_Block_cfgpred(n, 0))) == n)) {
return true;
}
#if 0
......@@ -595,8 +595,8 @@ get_start_index(ir_node *n) {
if (get_irn_op(n) == op_Phi ||
get_irn_op(n) == op_Block ||
(get_irn_op(n) == op_Filter && interprocedural_view) ||
(get_irg_pinned(get_irn_irg(n)) == floats &&
get_op_pinned(get_irn_op(n)) == floats))
(get_irg_pinned(get_irn_irg(n)) == op_pin_state_floats &&
get_op_pinned(get_irn_op(n)) == op_pin_state_floats))
// Here we could test for backedge at -1 which is illegal
return 0;
else
......@@ -1185,7 +1185,7 @@ void construct_ip_backedges (void) {
/* Find real entry points */
sb = get_irg_start_block(current_ir_graph);
if ((get_Block_n_cfgpreds(sb) > 1) ||
(get_nodes_Block(get_Block_cfgpred(sb, 0)) != sb)) continue;
(get_nodes_block(get_Block_cfgpred(sb, 0)) != sb)) continue;
/* Compute scc for this graph */
outermost_ir_graph = current_ir_graph;
set_irg_visited(outermost_ir_graph, get_max_irg_visited());
......
......@@ -77,7 +77,7 @@ static type *find_type_for_Proj(ir_node *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_ent(get_Start_irg(pred_pred)));
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);
......@@ -89,13 +89,13 @@ static type *find_type_for_Proj(ir_node *n) {
} break;
case iro_Start: {
/* globals and frame pointer */
if (get_Proj_proj(n) == pns_frame_base)
tp = find_pointer_type_to(get_irg_frame_type(get_Start_irg(pred)));
else if (get_Proj_proj(n) == pns_globals)
if (get_Proj_proj(n) == pn_Start_P_frame_base)
tp = find_pointer_type_to(get_irg_frame_type(get_irn_irg(pred)));
else if (get_Proj_proj(n) == pn_Start_P_globals)
tp = find_pointer_type_to(get_glob_type());
else if (get_Proj_proj(n) == pns_value_arg_base) {
else if (get_Proj_proj(n) == pn_Start_P_value_arg_base) {
VERBOSE_UNKNOWN_TYPE(("Value arg base proj %ld from Start: unknown type\n", get_irn_node_nr(n)));
tp = unknown_type; /* find_pointer_type_to(get....(get_entity_type(get_irg_ent(get_Start_irg(pred))))); */
tp = unknown_type; /* find_pointer_type_to(get....(get_entity_type(get_irg_entity(get_irn_irg(pred))))); */
} else {
VERBOSE_UNKNOWN_TYPE(("Proj %ld %ld from Start: unknown type\n", get_Proj_proj(n), get_irn_node_nr(n)));
tp = unknown_type;
......@@ -103,7 +103,7 @@ static type *find_type_for_Proj(ir_node *n) {
} break;
case iro_Call: {
/* value args pointer */
if (get_Proj_proj(n) == pncl_value_res_base) {
if (get_Proj_proj(n) == pn_Call_P_value_res_base) {
VERBOSE_UNKNOWN_TYPE(("Value res base Proj %ld from Call: unknown type\n", get_irn_node_nr(n)));
tp = unknown_type; /* find_pointer_type_to(get....get_Call_type(pred)); */
} else {
......@@ -147,7 +147,7 @@ static type *find_type_for_node(ir_node *n) {
/* Check returned type. */
/*
int i;
type *meth_type = get_entity_type(get_irg_ent(current_ir_graph));
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));
......@@ -232,9 +232,6 @@ static type *find_type_for_node(ir_node *n) {
ir_node *a = get_Load_ptr(n);
if (get_irn_op(a) == op_Sel)
tp = get_entity_type(get_Sel_entity(a));
else if ((get_irn_op(a) == op_Const) &&
(tarval_is_entity(get_Const_tarval(a))))
tp = get_entity_type(get_tarval_entity(get_Const_tarval(a)));
else if (is_pointer_type(compute_irn_type(a))) {
tp = get_pointer_points_to_type(get_irn_type(a));
if (is_array_type(tp)) tp = get_array_element_type(tp);
......
......@@ -76,7 +76,7 @@ static int add_graph (ir_graph *graph)
if (!eset_contains (_live_graphs, graph)) {
if (verbose > 1) {
fprintf(stdout, "RTA: new graph of ");
DDMEO(get_irg_ent (graph));
DDMEO(get_irg_entity (graph));
}
eset_insert (_live_graphs, graph);
......@@ -156,15 +156,6 @@ static void rta_act (ir_node *node, void *env)
if (iro_Sel == get_irn_opcode (ptr)) { /* CALL SEL */
ent = get_Sel_entity (ptr);
*change = add_implementing_graphs (ent);
} else if (iro_Const == get_irn_opcode (ptr)) { /* CALL CONST */
ent = get_tarval_entity (get_Const_tarval (ptr));
ir_graph *graph = get_entity_irg (ent);
/* don't use get_implementing_graph on a Const! */
if (graph) {
*change = add_graph (graph);
} else {
/* it's an external allocated thing. */
}
} else if (iro_SymConst == get_irn_opcode (ptr)) { /* CALL SYMCONST */
if (get_SymConst_kind(ptr) == symconst_addr_ent) {
ent = get_SymConst_entity (ptr);
......@@ -258,7 +249,7 @@ static int rta_fill_incremental (void)
if (verbose > 1) {
fprintf(stdout, "RTA: RUN %i: considering graph of ", n_runs);
DDMEO(get_irg_ent (graph));
DDMEO(get_irg_entity (graph));
}
rerun |= rta_fill_graph (graph);
......@@ -342,7 +333,7 @@ static void remove_irg (ir_graph *graph)
entity *ent = get_irg_entity (graph);
peculiarity pec = get_entity_peculiarity (ent);
/* DDMEO (get_irg_ent(graph)); */
/* DDMEO (get_irg_entity(graph)); */
/* delete the ir_graph data */
set_entity_peculiarity (ent, peculiarity_description);
......@@ -366,7 +357,7 @@ static void remove_irg (ir_graph *graph)
set_entity_peculiarity (ent, peculiarity_inherited);
exchange (get_atomic_ent_value (ent),
get_atomic_ent_value (get_irg_ent(graph)));
get_atomic_ent_value (get_irg_entity(graph)));
}
}
......@@ -472,7 +463,7 @@ void rta_delete_dead_graphs (void)
if ((verbose > 1) || get_opt_dead_method_elimination_verbose ()) {
fprintf(stdout, "RTA: removing graph of ");
DDMEO(get_irg_ent (graph));
DDMEO(get_irg_entity (graph));
}
remove_irg (graph);
......@@ -536,7 +527,7 @@ void rta_report (void)
for (i = 0; i < get_irp_n_irgs(); i++) {
if (rta_is_alive_graph (get_irp_irg(i))) {
fprintf(stdout, "RTA: considered called: graph of ");
DDMEO(get_irg_ent (get_irp_irg(i)));
DDMEO(get_irg_entity (get_irp_irg(i)));
}
}
}
......@@ -544,6 +535,11 @@ void rta_report (void)
/*
* $Log$
* Revision 1.22 2004/08/13 08:57:15 beyhan
* normalized names of functions, enums ...
* added suffix as argument to dumpers, removed global variable
* removed support for tarval/Const
*
* Revision 1.21 2004/07/08 15:50:56 goetz
* firmstat added
*
......
......@@ -48,9 +48,9 @@ init_firm(const firm_parameter_t *param)
}
/* initialize all ident stuff */
id_init(1024);
init_ident (1024);
/* enhanced statistics, need idents */
stat_init(def_params.enable_statistics);
init_stat();
/* create the type kinds. */
init_tpop();
/* create an obstack and put all tarvals in a pdeq */
......@@ -95,5 +95,5 @@ void free_firm(void) {
finish_op();
finish_mode();
finish_tpop();
id_finish();
finish_ident();
}
......@@ -69,7 +69,8 @@
extern "C" {
#endif
#include "old_fctnames.h"
// #include "old_fctnames.h"
/* The representations */
#include "firm_common.h" /* common type tags. */
......
......@@ -73,7 +73,7 @@ void firm_identify_thing(void *X)
printf("type: %s %s: %ld (%p)\n", get_type_tpop_name(X), get_type_name(X), get_type_nr(X), X);
break;
case k_ir_graph:
printf("graph: %s: %ld (%p)\n", get_entity_name(get_irg_ent(X)), get_irg_graph_nr(X), X);
printf("graph: %s: %ld (%p)\n", get_entity_name(get_irg_entity(X)), get_irg_graph_nr(X), X);
break;
case k_ir_node:
printf("irnode: %s%s %ld (%p)\n", get_irn_opname(X), get_mode_name(get_irn_mode(X)), get_irn_node_nr(X), X);
......
......@@ -283,7 +283,7 @@ void fw_collect_irn(ir_node *irn, void *env)
else
{
/* add this node to block's node list */
ir_node *block = get_nodes_Block(irn);
ir_node *block = get_nodes_block(irn);
data = fw_get_data(block);
ARR_APP1(ir_node *, FW_GET_DATA_LIST(data), irn);
}
......
......@@ -14,27 +14,56 @@
#ifndef __OLD_FCTNAMES_H__
#define __OLD_FCTNAMES_H__
/* firmstat */
#define stat_init init_stat
/* ircons */
#define add_in_edge(X, Y) add_immBlock_pred(X, Y)
#define mature_block(X) mature_immBlock(X)
#define switch_block(X) set_cur_block(X)
/* irgraph */
#define get_irg_params get_irg_n_locs
#define get_irg_n_loc get_irg_n_locs
#define set_irg_params set_irg_n_loc
#define get_irg_ent(X) get_irg_entity(X)
#define get_irg_params get_irg_n_locs
#define get_irg_n_loc get_irg_n_locs
#define set_irg_ent(X, Y) set_irg_entity(X, Y)
#define set_irg_params set_irg_n_loc
#define no_dom dom_none
#define no_outs outs_none
/* irnode.h */
#define get_Return_n_res get_Return_n_ress
#define get_Sel_n_index get_Sel_n_indexs
#define get_SymConst_ptrinfo get_SymConst_name
#define set_SymConst_ptrinfo set_SymConst_name
#define get_Return_n_res get_Return_n_ress
#define get_Sel_n_index get_Sel_n_indexs
#define get_SymConst_ptrinfo get_SymConst_name
#define set_SymConst_ptrinfo set_SymConst_name
#define get_nodes_Block(X) get_nodes_block(X)
#define set_nodes_Block(X, Y) set_nodes_block(X, Y)
#define get_Start_irg(X) get_irn_irg(X)
#define get_EndReg_irg(X) get_irn_irg(X)
#define get_EndExcept_irg(X) get_irn_irg(X)
#define get_CallBegin_irg(X) get_irn_irg(X)
#define get_ip_cfop_irg(X) get_irn_irg(X)
#define skip_nop(X) skip_Id(X)
/* irmode.h */
#define get_ident_of_mode get_mode_ident
#define get_size_of_mode get_mode_size
#define get_ld_align_of_mode get_mode_ld_align
#define get_min_of_mode get_mode_min
#define get_max_of_mode get_mode_max
#define get_null_of_mode get_mode_null
#define get_fsigned_of_mode get_mode_fsigned
#define get_ffloat_of_mode get_mode_ffloat
#define get_mode_size(X) { assert(get_mode_size_bytes(X) != -1); get_mode_size_bytes(X); }
#define get_ident_of_mode get_mode_ident
#define get_size_of_mode get_mode_size
#define get_ld_align_of_mode get_mode_ld_align
#define get_min_of_mode get_mode_min
#define get_max_of_mode get_mode_max
#define get_mode_vector_elems(X) get_mode_n_vector_elems(X)
#define get_null_of_mode get_mode_null
#define get_fsigned_of_mode get_mode_fsigned
#define get_ffloat_of_mode get_mode_ffloat
#define get_mode_size(X) { assert(get_mode_size_bytes(X) != -1); get_mode_size_bytes(X); }
/* irop */
#define floats op_pin_state_floats
#define pinned op_pin_state_pinned
#define op_pinned op_pin_state
/* type.h */
#define get_type_nameid(_t_) get_type_ident(_t_)
......@@ -50,10 +79,15 @@
#define tarval_from_long(X, Y) new_tarval_from_long(Y, X)
#define tarval_P_from_entity(X) new_tarval_from_entity(X, mode_P_mach)
#define tarval_to_entity(X) get_tarval_entity(X)
#define tarval_to_long(X) get_tarval_long(X)
#define tarval_to_double(X) get_tarval_double(X)
#define tarval_set_mode_output_option(X, Y) set_tarval_mode_output_option(X, Y)
#define tarval_get_mode_output_option(X) get_tarval_mode_output_option(X)
#define tarval_bitpattern(X) get_tarval_bitpattern(X)
#define tarval_sub_bits(X, Y) get_tarval_sub_bits(X, Y)
#define tarval_classify(X) classify_tarval(X)
/* ident.h */
#define id_to_strlen get_id_strlen
#define id_to_str get_id_str
#define id_to_strlen(X) get_id_strlen(X)
#define id_to_str(X) get_id_str(X)
#endif
......@@ -24,17 +24,17 @@
set *__id_set;
void id_init(int initial_n_idents)
void init_ident(int initial_n_idents)
{
__id_set = new_set(memcmp, initial_n_idents);
}
void id_finish (void) {
void finish_ident (void) {
del_set(__id_set);
__id_set = NULL;
}
ident *(id_from_str)(const char *str, int len)
ident *(new_id_from_chars)(const char *str, int len)
{
return __id_from_str(str, len);
}
......@@ -42,7 +42,7 @@ ident *(id_from_str)(const char *str, int len)
ident *new_id_from_str(const char *str)
{
assert(str);
return id_from_str(str, strlen(str));
return new_id_from_chars(str, strlen(str));
}
const char *(get_id_str)(ident *id)
......
......@@ -62,7 +62,7 @@ ident *new_id_from_str (const char *str);
*
* @see new_id_from_str(), get_id_strlen()
*/
ident *id_from_str (const char *str, int len);
ident *new_id_from_chars (const char *str, int len);
/**
* Returns a string represented by an ident.
......@@ -74,7 +74,7 @@ ident *id_from_str (const char *str, int len);
*
* @return cp - a string
*
* @see new_id_from_str(), id_from_str(), get_id_strlen()
* @see new_id_from_str(), new_id_from_chars(), get_id_strlen()
*/
const char *get_id_str (ident *id);
......@@ -85,7 +85,7 @@ const char *get_id_str (ident *id);
*
* @return len - the length of the string
*