From f667113899d26608e395458858dd22ad780d8beb Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 16 Jan 2007 15:51:58 +0000 Subject: [PATCH] renamed type opcode to ir_opcode [r8534] --- ir/ana/irbackedge.c | 2 +- ir/ana/rta.c | 5 ++++- ir/ana2/irmemwalk.c | 5 ++++- ir/ana2/pto_comp.c | 11 +++++++---- ir/ana2/pto_init.c | 7 +++++-- ir/ana2/pto_util.c | 7 +++++-- ir/ana2/typalise.c | 7 +++++-- ir/arch/modeconv.c | 6 +++--- ir/debug/firm_ycomp.c | 2 +- ir/ir/irdumptxt.c | 2 +- ir/ir/irnode.c | 8 ++++---- ir/ir/irnode.h | 2 +- ir/ir/irnode_t.h | 8 ++++---- ir/ir/irop.c | 6 +++--- ir/ir/irop.h | 8 ++++---- ir/ir/irop_t.h | 4 ++-- ir/ir/iropt.c | 14 +++++++------- ir/ir/iropt_t.h | 2 +- ir/ir/irreflect.c | 24 ++++++++++++------------ ir/ir/irreflect.h | 16 ++++++++-------- ir/ir/irvrfy.c | 2 +- ir/ir/irvrfy_t.h | 2 +- ir/lower/lower_dw.c | 2 +- ir/opt/opt_osr.c | 36 ++++++++++++++++++------------------ ir/opt/opt_polymorphy.c | 2 +- ir/opt/reassoc.c | 2 +- ir/opt/reassoc_t.h | 2 +- ir/stat/firmstat.c | 4 ++-- ir/stat/firmstat_t.h | 2 +- ir/stat/pattern.c | 2 +- 30 files changed, 110 insertions(+), 92 deletions(-) diff --git a/ir/ana/irbackedge.c b/ir/ana/irbackedge.c index 54d742742..ef031f342 100644 --- a/ir/ana/irbackedge.c +++ b/ir/ana/irbackedge.c @@ -88,7 +88,7 @@ static INLINE int legal_backarray (ir_node *n) { void fix_backedges(struct obstack *obst, ir_node *n) { int *arr = mere_get_backarray(n); - opcode opc; + ir_opcode opc; if (! arr) return; diff --git a/ir/ana/rta.c b/ir/ana/rta.c index 999247457..343774e63 100644 --- a/ir/ana/rta.c +++ b/ir/ana/rta.c @@ -173,7 +173,7 @@ static int add_implementing_graphs (ir_entity *method) static void rta_act (ir_node *node, void *env) { int *change = (int*) env; - opcode op = get_irn_opcode (node); + ir_opcode op = get_irn_opcode (node); if (iro_Call == op) { /* CALL */ ir_entity *ent = NULL; @@ -562,6 +562,9 @@ void rta_report (void) /* * $Log$ + * Revision 1.40 2007/01/16 15:45:15 beck + * renamed type opcode to ir_opcode + * * Revision 1.39 2006/12/13 13:15:12 beck * renamed entity -> ir_entity * diff --git a/ir/ana2/irmemwalk.c b/ir/ana2/irmemwalk.c index bbb8e3701..aaf435762 100644 --- a/ir/ana2/irmemwalk.c +++ b/ir/ana2/irmemwalk.c @@ -66,7 +66,7 @@ static walk_mem_env_t *walk_envs = NULL; static void irg_walk_mem_node (ir_node *node, walk_mem_env_t *walk_env) { - const opcode op = get_irn_opcode (node); + const ir_opcode op = get_irn_opcode (node); ir_node *in = NULL; if (get_irn_visited (node) >= walk_env->visited) { @@ -264,6 +264,9 @@ void irg_walk_mem (ir_graph *graph, /* $Log$ + Revision 1.12 2007/01/16 15:45:42 beck + renamed type opcode to ir_opcode + Revision 1.11 2005/01/26 12:20:20 beck gnu_ext.h included diff --git a/ir/ana2/pto_comp.c b/ir/ana2/pto_comp.c index e923966a5..fbaaba7e9 100644 --- a/ir/ana2/pto_comp.c +++ b/ir/ana2/pto_comp.c @@ -188,7 +188,7 @@ static pto_t *get_pto_proj (ir_node *proj, pto_env_t *env) { ir_node *proj_in = get_Proj_pred (proj); const long proj_proj = get_Proj_proj (proj); - const opcode in_op = get_irn_opcode (proj_in); + const ir_opcode in_op = get_irn_opcode (proj_in); pto_t *in_pto = NULL; pto_t *proj_pto = NULL; /* get_node_pto (proj); */ @@ -200,7 +200,7 @@ static pto_t *get_pto_proj (ir_node *proj, pto_env_t *env) return (NULL); case (iro_Proj): { /* ProjT (Start), ProjT (Call) */ - opcode in_in_op; + ir_opcode in_in_op; long proj_in_proj; proj_in_in = get_Proj_pred (proj_in); @@ -321,7 +321,7 @@ static pto_t *get_pto_ret (ir_node *ret, pto_env_t *env) /* Dispatch to propagate PTO values */ static pto_t *get_pto (ir_node *node, pto_env_t *env) { - const opcode op = get_irn_opcode (node); + const ir_opcode op = get_irn_opcode (node); DBGPRINT (2, (stdout, "%s (%s[%li])\n", __FUNCTION__, @@ -454,7 +454,7 @@ static void pto_method (ir_node *call, pto_env_t *pto_env) /* Perform the appropriate action on the given node */ static void pto_node_node(ir_node *node, pto_env_t *pto_env) { - opcode op = get_irn_opcode (node); + ir_opcode op = get_irn_opcode (node); DBGPRINT (1, (stdout, "%s (%s[%li])\n", __FUNCTION__, OPNAME (node), OPNUM (node))); @@ -756,6 +756,9 @@ pto_t *get_alloc_pto (ir_node *alloc) /* $Log$ + Revision 1.20 2007/01/16 15:45:42 beck + renamed type opcode to ir_opcode + Revision 1.19 2006/12/13 19:46:47 beck rename type entity into ir_entity diff --git a/ir/ana2/pto_init.c b/ir/ana2/pto_init.c index 976509cf5..c2ca4b4ad 100644 --- a/ir/ana2/pto_init.c +++ b/ir/ana2/pto_init.c @@ -181,7 +181,7 @@ static void reset_node_pto (ir_node *node, void *env) { reset_env_t *reset_env = (reset_env_t*) env; int ctx_idx = reset_env->ctx_idx; - opcode op = get_irn_opcode (node); + ir_opcode op = get_irn_opcode (node); /* HERE ("start"); */ @@ -232,7 +232,7 @@ static void init_pto (ir_node *node, void *env) init_env_t *init_env = (init_env_t*) env; int n_ctxs = init_env->n_ctxs; - opcode op = get_irn_opcode (node); + ir_opcode op = get_irn_opcode (node); switch (op) { case (iro_SymConst): { @@ -436,6 +436,9 @@ void pto_reset_graph_pto (ir_graph *graph, int ctx_idx) /* $Log$ + Revision 1.23 2007/01/16 15:45:42 beck + renamed type opcode to ir_opcode + Revision 1.22 2006/12/13 19:46:47 beck rename type entity into ir_entity diff --git a/ir/ana2/pto_util.c b/ir/ana2/pto_util.c index 5ab412301..2ea246159 100644 --- a/ir/ana2/pto_util.c +++ b/ir/ana2/pto_util.c @@ -106,7 +106,7 @@ ir_node **find_irg_args (ir_graph *graph) ir_entity *get_ptr_ent (ir_node *ptr) { ir_entity *ent = NULL; - const opcode ptr_op = get_irn_opcode (ptr); + const ir_opcode ptr_op = get_irn_opcode (ptr); switch (ptr_op) { case (iro_Cast): { ent = get_ptr_ent (get_Cast_op (ptr)); @@ -134,7 +134,7 @@ ir_entity *get_ptr_ent (ir_node *ptr) /* Check whether the load of the given ptr is a dummy */ int is_dummy_load_ptr (ir_node *ptr) { - const opcode ptr_op = get_irn_opcode (ptr); + const ir_opcode ptr_op = get_irn_opcode (ptr); switch (ptr_op) { case (iro_Cast): { @@ -154,6 +154,9 @@ int is_dummy_load_ptr (ir_node *ptr) /* $Log$ + Revision 1.19 2007/01/16 15:45:42 beck + renamed type opcode to ir_opcode + Revision 1.18 2006/12/13 19:46:47 beck rename type entity into ir_entity diff --git a/ir/ana2/typalise.c b/ir/ana2/typalise.c index 55e16a60a..b2dd94acb 100644 --- a/ir/ana2/typalise.c +++ b/ir/ana2/typalise.c @@ -630,7 +630,7 @@ static typalise_t *typalise_proj (ir_node *proj) cough_and_die (proj_in); } } else { - opcode op = get_irn_opcode (proj_in); + ir_opcode op = get_irn_opcode (proj_in); if ((iro_Load != op) && (iro_Alloc != op) && (iro_Call != op)) { fprintf (stdout, "\n Proj (%s) not handled\n", get_op_name (get_irn_op (proj_in))); @@ -677,7 +677,7 @@ lset_t *filter_for_ta (lset_t *set, typalise_t *ta) */ typalise_t *typalise (ir_node *node) { - opcode op = get_irn_opcode (node); + ir_opcode op = get_irn_opcode (node); typalise_t *res = NULL; switch (op) { @@ -874,6 +874,9 @@ void typalise_init (void) /* $Log$ + Revision 1.14 2007/01/16 15:45:42 beck + renamed type opcode to ir_opcode + Revision 1.13 2006/12/13 19:46:47 beck rename type entity into ir_entity diff --git a/ir/arch/modeconv.c b/ir/arch/modeconv.c index 028aa8d4e..6bad79f91 100644 --- a/ir/arch/modeconv.c +++ b/ir/arch/modeconv.c @@ -68,7 +68,7 @@ static ir_node *fix_irn_output(ir_node *node, ir_mode *mode) /** * Add a Conv node where needed on input */ -static ir_node *fix_irn_input(opcode code, ir_node *block, ir_node *pred, ir_mode *mode) +static ir_node *fix_irn_input(ir_opcode code, ir_node *block, ir_node *pred, ir_mode *mode) { switch (code) { case iro_DivMod: @@ -95,7 +95,7 @@ static ir_node *fix_irn_input(opcode code, ir_node *block, ir_node *pred, ir_mod */ static void fix_mode(ir_node *n, ir_mode *mode) { - opcode code = get_irn_opcode(n); + ir_opcode code = get_irn_opcode(n); if (code == iro_Proj) { code = get_irn_opcode(get_Proj_pred(n)); @@ -121,7 +121,7 @@ static void do_mode_conv(ir_node *n, void *env) walker_t *wenv = env; ir_mode *mode = get_irn_mode(n); ir_node *block; - opcode code; + ir_opcode code; /* save the old mode, we need this info later */ set_irn_link(n, mode); diff --git a/ir/debug/firm_ycomp.c b/ir/debug/firm_ycomp.c index ca2be79b7..cb7dfd6da 100644 --- a/ir/debug/firm_ycomp.c +++ b/ir/debug/firm_ycomp.c @@ -176,7 +176,7 @@ static void firm_ycomp_debug_init_realizer(firm_ycomp_dbg_t *dbg) { */ static INLINE unsigned get_node_realizer(ir_node *node) { unsigned realizer; - opcode opc = get_irn_opcode(node); + ir_opcode opc = get_irn_opcode(node); switch (opc) { case iro_Block: diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c index f0f57de55..fc59eedda 100644 --- a/ir/ir/irdumptxt.c +++ b/ir/ir/irdumptxt.c @@ -374,7 +374,7 @@ void dump_graph_as_text(ir_graph *irg, const char *suffix) { int addr_is_alloc(ir_node *acc) { ir_node *addr = NULL; - opcode addr_op; + ir_opcode addr_op; if (is_memop(acc)) { addr = get_memop_ptr(acc); } else { diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 1c659e133..670e2358d 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -417,7 +417,7 @@ void _set_irn_op(node, op); } -opcode +ir_opcode (get_irn_opcode)(const ir_node *node) { return _get_irn_opcode(node); @@ -2816,7 +2816,7 @@ static ir_type *get_Default_type(ir_node *n) { } /* Sets the get_type operation for an ir_op_ops. */ -ir_op_ops *firm_set_default_get_type(opcode code, ir_op_ops *ops) +ir_op_ops *firm_set_default_get_type(ir_opcode code, ir_op_ops *ops) { switch (code) { case iro_Const: ops->get_type = get_Const_type; break; @@ -2854,7 +2854,7 @@ static ir_type *get_Null_type(ir_node *n) { } /* Sets the get_type operation for an ir_op_ops. */ -ir_op_ops *firm_set_default_get_type_attr(opcode code, ir_op_ops *ops) +ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops) { switch (code) { case iro_SymConst: ops->get_type_attr = get_SymConst_attr_type; break; @@ -2877,7 +2877,7 @@ static ir_entity *get_Null_ent(ir_node *n) { } /* Sets the get_type operation for an ir_op_ops. */ -ir_op_ops *firm_set_default_get_entity_attr(opcode code, ir_op_ops *ops) +ir_op_ops *firm_set_default_get_entity_attr(ir_opcode code, ir_op_ops *ops) { switch (code) { case iro_SymConst: ops->get_entity_attr = get_SymConst_attr_entity; break; diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index a782a95bd..89e10ce3f 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -174,7 +174,7 @@ ir_op *get_irn_op(const ir_node *node); /** Sets the opcode struct of the node. */ void set_irn_op(ir_node *node, ir_op *op); /** Gets the opcode-enum of the node. */ -opcode get_irn_opcode(const ir_node *node); +ir_opcode get_irn_opcode(const ir_node *node); /** Get the string representation of the opcode. */ const char *get_irn_opname(const ir_node *node); /** Get the ident for a string representation of the opcode. */ diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index c4ad92482..a1afef4ca 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -309,7 +309,7 @@ extern unsigned firm_add_node_size; * @return * The operations. */ -ir_op_ops *firm_set_default_get_type(opcode code, ir_op_ops *ops); +ir_op_ops *firm_set_default_get_type(ir_opcode code, ir_op_ops *ops); /** * Sets the get_type_attr operation for an ir_op_ops. @@ -320,7 +320,7 @@ ir_op_ops *firm_set_default_get_type(opcode code, ir_op_ops *ops); * @return * The operations. */ -ir_op_ops *firm_set_default_get_type_attr(opcode code, ir_op_ops *ops); +ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops); /** * Sets the get_entity_attr operation for an ir_op_ops. @@ -331,7 +331,7 @@ ir_op_ops *firm_set_default_get_type_attr(opcode code, ir_op_ops *ops); * @return * The operations. */ -ir_op_ops *firm_set_default_get_entity_attr(opcode code, ir_op_ops *ops); +ir_op_ops *firm_set_default_get_entity_attr(ir_opcode code, ir_op_ops *ops); /*-------------------------------------------------------------------*/ /* These function are most used in libfirm. Give them as static */ @@ -377,7 +377,7 @@ copy_node_attr(const ir_node *old_node, ir_node *new_node) { * Gets the opcode of a node. * Intern version for libFirm. */ -static INLINE opcode +static INLINE ir_opcode _get_irn_opcode(const ir_node *node) { assert(k_ir_node == get_kind(node)); assert(node->op); diff --git a/ir/ir/irop.c b/ir/ir/irop.c index 4a0ae5441..33b2f8d00 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -144,7 +144,7 @@ block_copy_attr(const ir_node *old_node, ir_node *new_node) { * @return * The operations. */ -static ir_op_ops *firm_set_default_copy_attr(opcode code, ir_op_ops *ops) { +static ir_op_ops *firm_set_default_copy_attr(ir_opcode code, ir_op_ops *ops) { if (code == iro_Call) ops->copy_attr = call_copy_attr; else if (code == iro_Block) @@ -159,7 +159,7 @@ static ir_op_ops *firm_set_default_copy_attr(opcode code, ir_op_ops *ops) { /* Creates a new ir operation. */ ir_op * -new_ir_op(opcode code, const char *name, op_pin_state p, +new_ir_op(ir_opcode code, const char *name, op_pin_state p, unsigned flags, op_arity opar, int op_index, size_t attr_size, const ir_op_ops *ops) { @@ -374,7 +374,7 @@ const char *get_op_name (const ir_op *op) { return get_id_str(op->name); } /* get_op_name */ -opcode (get_op_code)(const ir_op *op){ +ir_opcode (get_op_code)(const ir_op *op){ return _get_op_code(op); } /* get_op_code */ diff --git a/ir/ir/irop.h b/ir/ir/irop.h index 9604dbd38..4370f26e6 100644 --- a/ir/ir/irop.h +++ b/ir/ir/irop.h @@ -85,7 +85,7 @@ typedef enum { iro_InstOf, iro_Raise, iro_Bound, iro_Pin, iro_MaxOpcode -} opcode; +} ir_opcode; #ifndef _IR_OP_TYPEDEF_ #define _IR_OP_TYPEDEF_ @@ -169,7 +169,7 @@ ident *get_op_ident(const ir_op *op); const char *get_op_name(const ir_op *op); /** Returns the enum for the opcode */ -opcode get_op_code(const ir_op *op); +ir_opcode get_op_code(const ir_op *op); /** op_pin_state_pinned states */ typedef enum { @@ -355,8 +355,8 @@ typedef struct { * This function can create all standard Firm opcode as well as new ones. * The behavior of new opcode depends on the operations \c ops and the \c flags. */ -ir_op * new_ir_op(opcode code, const char *name, op_pin_state p, - unsigned flags, op_arity opar, int op_index, size_t attr_size, +ir_op *new_ir_op(ir_opcode code, const char *name, op_pin_state p, + unsigned flags, op_arity opar, int op_index, size_t attr_size, const ir_op_ops *ops); /** Returns the ir_op_ops of an ir_op. */ diff --git a/ir/ir/irop_t.h b/ir/ir/irop_t.h index 6082e05fe..11ec792b8 100644 --- a/ir/ir/irop_t.h +++ b/ir/ir/irop_t.h @@ -20,7 +20,7 @@ /** The type of an ir_op. */ struct ir_op { - opcode code; /**< The unique opcode of the op. */ + ir_opcode code; /**< The unique opcode of the op. */ ident *name; /**< The name of the op. */ size_t attr_size; /**< Space needed in memory for private attributes. */ op_pin_state op_pin_state_pinned; /**< How to deal with the node in CSE, PRE. */ @@ -131,7 +131,7 @@ static INLINE int is_op_machine_user(const ir_op *op, unsigned n) { return op->flags & (irop_flag_user << n); } -static INLINE opcode _get_op_code(const ir_op *op) { +static INLINE ir_opcode _get_op_code(const ir_op *op) { return op->code; } diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index b3ae4da94..8adb26c32 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -661,7 +661,7 @@ tarval *computed_value(ir_node *n) { * @return * The operations. */ -static ir_op_ops *firm_set_default_computed_value(opcode code, ir_op_ops *ops) +static ir_op_ops *firm_set_default_computed_value(ir_opcode code, ir_op_ops *ops) { #define CASE(a) \ case iro_##a: \ @@ -1609,7 +1609,7 @@ ir_node *equivalent_node(ir_node *n) { * @return * The operations. */ -static ir_op_ops *firm_set_default_equivalent_node(opcode code, ir_op_ops *ops) +static ir_op_ops *firm_set_default_equivalent_node(ir_opcode code, ir_op_ops *ops) { #define CASE(a) \ case iro_##a: \ @@ -3425,7 +3425,7 @@ static ir_node *transform_node(ir_node *n) * @return * The operations. */ -static ir_op_ops *firm_set_default_transform_node(opcode code, ir_op_ops *ops) +static ir_op_ops *firm_set_default_transform_node(ir_opcode code, ir_op_ops *ops) { #define CASE(a) \ case iro_##a: \ @@ -3566,7 +3566,7 @@ static int node_cmp_attr_Confirm(ir_node *a, ir_node *b) { * @return * The operations. */ -static ir_op_ops *firm_set_default_node_cmp_attr(opcode code, ir_op_ops *ops) +static ir_op_ops *firm_set_default_node_cmp_attr(ir_opcode code, ir_op_ops *ops) { #define CASE(a) \ case iro_##a: \ @@ -3872,7 +3872,7 @@ ir_node *optimize_node(ir_node *n) { tarval *tv; ir_node *oldn = n; - opcode iro = get_irn_opcode(n); + ir_opcode iro = get_irn_opcode(n); /* Always optimize Phi nodes: part of the construction. */ if ((!get_opt_optimize()) && (iro != iro_Phi)) return n; @@ -3981,7 +3981,7 @@ ir_node *optimize_in_place_2(ir_node *n) { tarval *tv; ir_node *oldn = n; - opcode iro = get_irn_opcode(n); + ir_opcode iro = get_irn_opcode(n); if (!get_opt_optimize() && (get_irn_op(n) != op_Phi)) return n; @@ -4076,7 +4076,7 @@ ir_node *optimize_in_place(ir_node *n) { /* * Sets the default operation for an ir_ops. */ -ir_op_ops *firm_set_default_operations(opcode code, ir_op_ops *ops) { +ir_op_ops *firm_set_default_operations(ir_opcode code, ir_op_ops *ops) { ops = firm_set_default_computed_value(code, ops); ops = firm_set_default_equivalent_node(code, ops); ops = firm_set_default_transform_node(code, ops); diff --git a/ir/ir/iropt_t.h b/ir/ir/iropt_t.h index f0eb3071e..c80f8083c 100644 --- a/ir/ir/iropt_t.h +++ b/ir/ir/iropt_t.h @@ -96,6 +96,6 @@ value_of(ir_node *n) { * @return * The operations. */ -ir_op_ops *firm_set_default_operations(opcode code, ir_op_ops *ops); +ir_op_ops *firm_set_default_operations(ir_opcode code, ir_op_ops *ops); #endif /* _IROPT_T_H_ */ diff --git a/ir/ir/irreflect.c b/ir/ir/irreflect.c index 94ee9ffdc..076d7c578 100644 --- a/ir/ir/irreflect.c +++ b/ir/ir/irreflect.c @@ -61,7 +61,7 @@ typedef struct { } rflct_args_t; typedef struct { - opcode opc; + ir_opcode opc; const char *name; int commutative; int sig_count; @@ -124,12 +124,12 @@ rflct_mode_class_t rflct_get_mode_class(const ir_mode *mode) { return RFLCT_MC(None); } -static INLINE const rflct_opcode_t *get_opcode(opcode opc) { +static INLINE const rflct_opcode_t *get_opcode(ir_opcode opc) { assert(opc >= 0 && opc < OPCODES_COUNT && "Invalid opcode"); return opcodes[opc]; } -static INLINE const rflct_arg_t *get_args(opcode opc, int sig) { +static INLINE const rflct_arg_t *get_args(ir_opcode opc, int sig) { const rflct_opcode_t *opcode = get_opcode(opc); assert(sig >= 0 && sig < opcode->sig_count && "Invalid signature"); @@ -139,12 +139,12 @@ static INLINE const rflct_arg_t *get_args(opcode opc, int sig) { #define GET_OPCODE(opc) get_opcode(opc) #define GET_ARGS(opc,args) get_args(opc, args) -int rflct_get_signature_count(opcode opc) { +int rflct_get_signature_count(ir_opcode opc) { const rflct_opcode_t *opcode = GET_OPCODE(opc); return opcode->sig_count; } -int rflct_get_in_args_count(opcode opc, int sig) { +int rflct_get_in_args_count(ir_opcode opc, int sig) { const rflct_arg_t *args = GET_ARGS(opc, sig); int res = 0, i = 0; @@ -153,7 +153,7 @@ int rflct_get_in_args_count(opcode opc, int sig) { return res; } -int rflct_get_out_args_count(opcode opc, int sig) { +int rflct_get_out_args_count(ir_opcode opc, int sig) { const rflct_arg_t *args = GET_ARGS(opc, sig); int i = 0; for(i = 0; args[i].name != NULL; i++); @@ -161,7 +161,7 @@ int rflct_get_out_args_count(opcode opc, int sig) { } -const rflct_arg_t *rflct_get_in_args(opcode opc, int sig) { +const rflct_arg_t *rflct_get_in_args(ir_opcode opc, int sig) { const rflct_arg_t *args = GET_ARGS(opc, sig); int i; @@ -169,12 +169,12 @@ const rflct_arg_t *rflct_get_in_args(opcode opc, int sig) { return &args[i + 1]; } -const rflct_arg_t *rflct_get_out_args(opcode opc, int sig) { +const rflct_arg_t *rflct_get_out_args(ir_opcode opc, int sig) { return GET_ARGS(opc, sig); } int rflct_signature_match(const ir_node *irn, int sig) { - opcode op = get_irn_opcode(irn); + ir_opcode op = get_irn_opcode(irn); const rflct_arg_t *args = rflct_get_in_args(op, sig); int dst = 0; int i, j; @@ -300,7 +300,7 @@ static void rflct_obstack_grow_args(struct obstack *obst, } -char *rflct_to_string(char *buf, int n, opcode opc, int sig) { +char *rflct_to_string(char *buf, int n, ir_opcode opc, int sig) { struct obstack obst; char *s; const rflct_opcode_t *opcode = GET_OPCODE(opc); @@ -403,7 +403,7 @@ arg->name = _name; \ arg->is_variadic = _var; \ arg->mode_equals = _me; -void rflct_new_opcode(opcode opc, const char *name, int commutative) +void rflct_new_opcode(ir_opcode opc, const char *name, int commutative) { rflct_opcode_t *ropc = obstack_alloc(&obst, sizeof(*ropc)); @@ -416,7 +416,7 @@ void rflct_new_opcode(opcode opc, const char *name, int commutative) opcodes[opc] = ropc; } -int rflct_opcode_add_signature(opcode opc, rflct_sig_t *sig) +int rflct_opcode_add_signature(ir_opcode opc, rflct_sig_t *sig) { rflct_arg_t *args = sig->args; rflct_opcode_t *op = opcodes[opc]; diff --git a/ir/ir/irreflect.h b/ir/ir/irreflect.h index c0db562b5..41870966c 100644 --- a/ir/ir/irreflect.h +++ b/ir/ir/irreflect.h @@ -83,7 +83,7 @@ rflct_mode_class_t rflct_get_mode_class(const ir_mode *mode); * @param opc The opcode. * @return The number of signatures for this opcode. */ -int rflct_get_signature_count(opcode opc); +int rflct_get_signature_count(ir_opcode opc); /** * Try to get the signature, that matches to a given instance @@ -100,7 +100,7 @@ int rflct_get_signature(const ir_node *irn); * @param sig The signature you are refering to. * @return The number of arguments. */ -int rflct_get_in_args_count(opcode opc, int sig); +int rflct_get_in_args_count(ir_opcode opc, int sig); /** * Get the number of out arguments. @@ -109,7 +109,7 @@ int rflct_get_in_args_count(opcode opc, int sig); * @param sig The signature you are refering to. * @return The number of arguments. */ -int rflct_get_out_args_count(opcode opc, int sig); +int rflct_get_out_args_count(ir_opcode opc, int sig); #define rflct_get_args_count(opc, sig, use) \ ((use) ? rflct_get_in_args_count(opc, sig) : rflct_get_out_args_count(opc, sig)) @@ -123,7 +123,7 @@ int rflct_get_out_args_count(opcode opc, int sig); * 0 and the signature count). * @return The array. */ -const rflct_arg_t *rflct_get_in_args(opcode opc, int sig); +const rflct_arg_t *rflct_get_in_args(ir_opcode opc, int sig); /** * Get the array of def args. @@ -134,7 +134,7 @@ const rflct_arg_t *rflct_get_in_args(opcode opc, int sig); * 0 and the signature count). * @return The array. */ -const rflct_arg_t *rflct_get_out_args(opcode opc, int sig); +const rflct_arg_t *rflct_get_out_args(ir_opcode opc, int sig); #define rflct_get_args(opc, sig, use) \ ((use) ? rflct_get_in_args(opc, sig) : rflct_get_out_args(opc, sig)) @@ -147,7 +147,7 @@ const rflct_arg_t *rflct_get_out_args(opcode opc, int sig); * @param sig The signature. * @return buf. */ -char *rflct_to_string(char *buf, int n, opcode opc, int sig); +char *rflct_to_string(char *buf, int n, ir_opcode opc, int sig); /** * Get a string representation of a mode class. @@ -164,7 +164,7 @@ char *rflct_mode_class_name(char *str, int n, rflct_mode_class_t mc); * @param name A name. * @param commutative non-zero, if the opcode is commutative. */ -void rflct_new_opcode(opcode opc, const char *name, int commutative); +void rflct_new_opcode(ir_opcode opc, const char *name, int commutative); /** * Add a signature to the opcode. @@ -173,7 +173,7 @@ void rflct_new_opcode(opcode opc, const char *name, int commutative); * @return non-zero, if the signature was added successfully, false if no * more signatures can be added to the opcode. */ -int rflct_opcode_add_signature(opcode opc, rflct_sig_t *sig); +int rflct_opcode_add_signature(ir_opcode opc, rflct_sig_t *sig); /** * Allocate a new signature. diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index d3edd6bcf..30ffea46f 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -1989,7 +1989,7 @@ int irg_vrfy_bads(ir_graph *irg, int flags) /* * set the default verify operation */ -void firm_set_default_verifyer(opcode code, ir_op_ops *ops) +void firm_set_default_verifyer(ir_opcode code, ir_op_ops *ops) { #define CASE(a) \ case iro_##a: \ diff --git a/ir/ir/irvrfy_t.h b/ir/ir/irvrfy_t.h index 66c3b66ce..e772596e1 100644 --- a/ir/ir/irvrfy_t.h +++ b/ir/ir/irvrfy_t.h @@ -66,6 +66,6 @@ do { \ /** * Set the default verify_node and verify_proj_node operation for an ir_op_ops. */ -void firm_set_default_verifyer(opcode code, ir_op_ops *ops); +void firm_set_default_verifyer(ir_opcode code, ir_op_ops *ops); #endif /* _IRVRFY_T_H_ */ diff --git a/ir/lower/lower_dw.c b/ir/lower/lower_dw.c index 5d4a9670d..777e24fb1 100644 --- a/ir/lower/lower_dw.c +++ b/ir/lower/lower_dw.c @@ -2110,7 +2110,7 @@ static void lower_Psi(ir_node *psi, ir_mode *mode, lower_env_t *env) { /** * check for opcodes that must always be lowered. */ -static int always_lower(opcode code) { +static int always_lower(ir_opcode code) { switch (code) { case iro_Proj: case iro_Start: diff --git a/ir/opt/opt_osr.c b/ir/opt/opt_osr.c index 26e864796..9ae4a3f39 100644 --- a/ir/opt/opt_osr.c +++ b/ir/opt/opt_osr.c @@ -80,21 +80,21 @@ typedef struct iv_env { * An entry in the (op, node, node) -> node map. */ typedef struct quadruple_t { - opcode code; /**< the opcode of the reduced operation */ - ir_node *op1; /**< the first operand the reduced operation */ - ir_node *op2; /**< the second operand of the reduced operation */ + ir_opcode code; /**< the opcode of the reduced operation */ + ir_node *op1; /**< the first operand the reduced operation */ + ir_node *op2; /**< the second operand of the reduced operation */ - ir_node *res; /**< the reduced operation */ + ir_node *res; /**< the reduced operation */ } quadruple_t; /** * A LFTR edge. */ typedef struct LFTR_edge { - ir_node *src; /**< the source node */ - ir_node *dst; /**< the destination node */ - opcode code; /**< the opcode that must be applied */ - ir_node *rc; /**< the region const that must be applied */ + ir_node *src; /**< the source node */ + ir_node *dst; /**< the destination node */ + ir_opcode code; /**< the opcode that must be applied */ + ir_node *rc; /**< the region const that must be applied */ } LFTR_edge; /* forward */ @@ -126,7 +126,7 @@ static LFTR_edge *LFTR_find(ir_node *src, iv_env *env) { /** * Add a LFTR edge. */ -static void LFTR_add(ir_node *src, ir_node *dst, opcode code, ir_node *rc, iv_env *env) { +static void LFTR_add(ir_node *src, ir_node *dst, ir_opcode code, ir_node *rc, iv_env *env) { LFTR_edge key; key.src = src; @@ -201,7 +201,7 @@ static int quad_cmp(const void *e1, const void *e2, size_t size) { * * @return the already reduced node or NULL if this operation is not yet reduced */ -static ir_node *search(opcode code, ir_node *op1, ir_node *op2, iv_env *env) { +static ir_node *search(ir_opcode code, ir_node *op1, ir_node *op2, iv_env *env) { quadruple_t key, *entry; key.code = code; @@ -224,7 +224,7 @@ static ir_node *search(opcode code, ir_node *op1, ir_node *op2, iv_env *env) { * @param result the result of the reduced operation * @param env the environment */ -static void add(opcode code, ir_node *op1, ir_node *op2, ir_node *result, iv_env *env) { +static void add(ir_opcode code, ir_node *op1, ir_node *op2, ir_node *result, iv_env *env) { quadruple_t key; key.code = code; @@ -265,7 +265,7 @@ static ir_node *find_location(ir_node *block1, ir_node *block2) { * * @return the newly created node */ -static ir_node *do_apply(opcode code, dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode) { +static ir_node *do_apply(ir_opcode code, dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode) { ir_graph *irg = current_ir_graph; ir_node *result; ir_node *block = find_location(get_nodes_block(op1), get_nodes_block(op2)); @@ -299,7 +299,7 @@ static ir_node *do_apply(opcode code, dbg_info *db, ir_node *op1, ir_node *op2, * @return the newly created node */ static ir_node *apply(ir_node *orig, ir_node *op1, ir_node *op2, iv_env *env) { - opcode code = get_irn_opcode(orig); + ir_opcode code = get_irn_opcode(orig); ir_node *result = search(code, op1, op2, env); if (! result) { @@ -332,7 +332,7 @@ static ir_node *apply(ir_node *orig, ir_node *op1, ir_node *op2, iv_env *env) { * @return the reduced node */ static ir_node *reduce(ir_node *orig, ir_node *iv, ir_node *rc, iv_env *env) { - opcode code = get_irn_opcode(orig); + ir_opcode code = get_irn_opcode(orig); ir_node *result = search(code, iv, rc, env); if (! result) { @@ -422,10 +422,10 @@ static int replace(ir_node *irn, ir_node *iv, ir_node *rc, iv_env *env) { * @return non-zero if irn should be Replace'd */ static int check_replace(ir_node *irn, iv_env *env) { - ir_node *left, *right, *iv, *rc; - ir_op *op = get_irn_op(irn); - opcode code = get_op_code(op); - ir_node *liv, *riv; + ir_node *left, *right, *iv, *rc; + ir_op *op = get_irn_op(irn); + ir_opcode code = get_op_code(op); + ir_node *liv, *riv; switch (code) { case iro_Mul: diff --git a/ir/opt/opt_polymorphy.c b/ir/opt/opt_polymorphy.c index 04ca9ad88..437ae5dab 100644 --- a/ir/opt/opt_polymorphy.c +++ b/ir/opt/opt_polymorphy.c @@ -63,7 +63,7 @@ static ir_type *get_dynamic_type(ir_node *ptr) { /* skip Cast and Confirm nodes */ for (;;) { - opcode code = get_irn_opcode(ptr); + ir_opcode code = get_irn_opcode(ptr); switch (code) { case iro_Cast: diff --git a/ir/opt/reassoc.c b/ir/opt/reassoc.c index e5ac87626..7ea3dde15 100644 --- a/ir/opt/reassoc.c +++ b/ir/opt/reassoc.c @@ -421,7 +421,7 @@ void optimize_reassociation(ir_graph *irg) } /* Sets the default reassociation operation for an ir_op_ops. */ -ir_op_ops *firm_set_default_reassoc(opcode code, ir_op_ops *ops) +ir_op_ops *firm_set_default_reassoc(ir_opcode code, ir_op_ops *ops) { #define CASE(a) case iro_##a: ops->reassociate = reassoc_##a; break diff --git a/ir/opt/reassoc_t.h b/ir/opt/reassoc_t.h index cfa0892fe..cfa9b9df4 100644 --- a/ir/opt/reassoc_t.h +++ b/ir/opt/reassoc_t.h @@ -30,7 +30,7 @@ * @return * The operations. */ -ir_op_ops *firm_set_default_reassoc(opcode code, ir_op_ops *ops); +ir_op_ops *firm_set_default_reassoc(ir_opcode code, ir_op_ops *ops); /** Initialise the ressociation optimization */ void firm_init_reassociation(void); diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c index 8d4d47591..6b31faff5 100644 --- a/ir/stat/firmstat.c +++ b/ir/stat/firmstat.c @@ -228,7 +228,7 @@ static node_entry_t *opcode_get_entry(const ir_op *op, hmap_node_entry_t *hmap) * @param code the IR opcode * @param hmap the hash map containing opcode -> ir_op* */ -static ir_op *opcode_find_entry(opcode code, hmap_ir_op *hmap) { +static ir_op *opcode_find_entry(ir_opcode code, hmap_ir_op *hmap) { ir_op key; key.code = code; @@ -1230,7 +1230,7 @@ void stat_register_dumper_func(dump_graph_FUNC func) { /* * Helper: get an ir_op from an opcode. */ -ir_op *stat_get_op_from_opcode(opcode code) { +ir_op *stat_get_op_from_opcode(ir_opcode code) { return opcode_find_entry(code, status->ir_op_hash); } /* stat_get_op_from_opcode */ diff --git a/ir/stat/firmstat_t.h b/ir/stat/firmstat_t.h index dbf36eb48..5349db973 100644 --- a/ir/stat/firmstat_t.h +++ b/ir/stat/firmstat_t.h @@ -298,7 +298,7 @@ struct _dumper_t { /** * helper: get an ir_op from an opcode */ -ir_op *stat_get_op_from_opcode(opcode code); +ir_op *stat_get_op_from_opcode(ir_opcode code); /* API for distribution tables */ diff --git a/ir/stat/pattern.c b/ir/stat/pattern.c index e8511a298..a81145d75 100644 --- a/ir/stat/pattern.c +++ b/ir/stat/pattern.c @@ -369,7 +369,7 @@ static int _encode_node(ir_node *node, int max_depth, codec_env_t *env) { int i, preds; int res, depth; - opcode code = get_irn_opcode(node); + ir_opcode code = get_irn_opcode(node); /* insert the node into our ID map */ entry.addr = node; -- 2.20.1