X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firop.c;h=a04437d25b5e757fc6d6926dcb08d31becf6cb2a;hb=ea931ee5adfa947b301765044e228d27fed408cd;hp=fdf97a30f9579b9a1f52443399861e51858d544d;hpb=019ff5543213350609df7bbe8854c09987819169;p=libfirm diff --git a/ir/ir/irop.c b/ir/ir/irop.c index fdf97a30f..a04437d25 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -24,6 +24,7 @@ # include "iropt_t.h" /* for firm_set_default_operations */ # include "irvrfy_t.h" +# include "reassoc_t.h" # include "xmalloc.h" @@ -92,7 +93,9 @@ ir_op *op_EndExcept; ir_op *get_op_EndExcept (void) { return op_EndExcept; } ir_op *op_NoMem; ir_op *get_op_NoMem (void) { return op_NoMem; } ir_op *op_Mux; ir_op *get_op_Mux (void) { return op_Mux; } ir_op *op_CopyB; ir_op *get_op_CopyB (void) { return op_CopyB; } +ir_op *op_Bound; ir_op *get_op_Bound (void) { return op_Bound; } +ir_op *op_Keep; ir_op *get_op_Keep (void) { return op_Keep; } /* * Copies all attributes stored in the old node to the new node. @@ -178,6 +181,7 @@ new_ir_op(opcode code, const char *name, op_pin_state p, firm_set_default_operations(code, &res->ops); firm_set_default_copy_attr(code, &res->ops); firm_set_default_verifyer(code, &res->ops); + firm_set_default_reassoc(code, &res->ops); hook_new_ir_op(res); return res; @@ -215,7 +219,7 @@ init_op(void) op_SymConst = new_ir_op(iro_SymConst, "SymConst", op_pin_state_floats, c, oparity_zero, -1, sizeof(symconst_attr), NULL); op_Sel = new_ir_op(iro_Sel, "Sel", op_pin_state_floats, L, oparity_any, -1, sizeof(sel_attr), NULL); - op_InstOf = new_ir_op(iro_InstOf, "InstOf", op_pin_state_floats, L, oparity_any, -1, sizeof(sel_attr), NULL); + op_InstOf = new_ir_op(iro_InstOf, "InstOf", op_pin_state_floats, L|F|H, oparity_unary, -1, sizeof(io_attr), NULL); op_Call = new_ir_op(iro_Call, "Call", op_pin_state_mem_pinned, L|F, oparity_variable, -1, sizeof(call_attr), NULL); op_Add = new_ir_op(iro_Add, "Add", op_pin_state_floats, C, oparity_binary, 0, 0, NULL); @@ -263,6 +267,9 @@ init_op(void) op_NoMem = new_ir_op(iro_NoMem, "NoMem", op_pin_state_pinned, N, oparity_zero, -1, 0, NULL); op_Mux = new_ir_op(iro_Mux, "Mux", op_pin_state_floats, N, oparity_trinary, -1, 0, NULL); op_CopyB = new_ir_op(iro_CopyB, "CopyB", op_pin_state_mem_pinned, L|F|H, oparity_trinary, -1, sizeof(copyb_attr), NULL); + op_Bound = new_ir_op(iro_Bound, "Bound", op_pin_state_mem_pinned, L|F|H, oparity_trinary, -1, sizeof(bound_attr), NULL); + + op_Keep = new_ir_op(iro_Keep, "Keep", op_pin_state_pinned, N, oparity_variable, -1, 0, NULL); #undef H #undef Y @@ -337,6 +344,9 @@ void finish_op(void) { free_ir_op (op_NoMem ); op_NoMem = NULL; free_ir_op (op_Mux ); op_Mux = NULL; free_ir_op (op_CopyB ); op_CopyB = NULL; + free_ir_op (op_Bound ); op_Bound = NULL; + + free_ir_op (op_Keep ); op_Keep = NULL; } /* Returns the string for the opcode. */ @@ -389,3 +399,8 @@ op_func (get_generic_function_ptr)(const ir_op *op) { void (set_generic_function_ptr)(ir_op *op, op_func func) { _set_generic_function_ptr(op, func); } + +/* Returns the ir_op_ops of an ir_op. */ +const ir_op_ops *(get_op_ops)(const ir_op *op) { + return _get_op_ops(op); +}