Commit 21c6606d authored by Matthias Braun's avatar Matthias Braun
Browse files

initialize backend opcode right after frontend opcodes

[r25379]
parent fda30a9a
====== libFirm 1.16.0 (2008-12-11) ======
====== libFirm 1.16.0 (XXXX) ======
* bugfixes
====== libFirm 1.15.0 (2008-12-01) ======
......
......@@ -926,8 +926,6 @@ void be_main(FILE *file_handle, const char *cup_name)
/* never build code for pseudo irgs */
set_visit_pseudo_irgs(0);
be_node_init();
be_main_loop(file_handle, cup_name);
if (be_options.timing == BE_TIME_ON) {
......
......@@ -1599,14 +1599,8 @@ int is_be_node(const ir_node *irn)
return get_op_ops(get_irn_op(irn))->be_ops == &be_node_irn_ops;
}
void be_node_init(void) {
static int inited = 0;
if(inited)
return;
inited = 1;
void be_init_op(void)
{
/* Acquire all needed opcodes. */
op_be_Spill = new_ir_op(beo_Spill, "be_Spill", op_pin_state_pinned, N, oparity_unary, 0, sizeof(be_frame_attr_t), &be_node_op_ops);
op_be_Reload = new_ir_op(beo_Reload, "be_Reload", op_pin_state_pinned, N, oparity_zero, 0, sizeof(be_frame_attr_t), &be_node_op_ops);
......
......@@ -80,7 +80,7 @@ int is_be_node(const ir_node *irn);
/**
* Create all BE specific opcodes.
*/
void be_node_init(void);
void be_init_op(void);
/**
* Position numbers for the be_Spill inputs.
......
......@@ -38,6 +38,8 @@
#include "xmalloc.h"
void be_init_op(void);
/** the available next opcode */
static unsigned next_iro = iro_MaxOpcode;
......@@ -372,6 +374,9 @@ init_op(void)
#undef E
#undef NB
#undef NI
/* initialize backend opcodes */
be_init_op();
} /* init_op */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment