Commit 7237d36d authored by Matthias Braun's avatar Matthias Braun
Browse files

irhooks: Remove new_ir_op/free_ir_op hooks

parent aa7c5e02
......@@ -25,12 +25,6 @@ typedef void (generic_func)(void);
struct hook_entry {
/** A union of all possible hook types. */
union {
/** This hook is called, after a new ir_op was created. */
void (*_hook_new_ir_op)(void *context, ir_op *op);
/** This hook is called, before am ir_op is destroyed. */
void (*_hook_free_ir_op)(void *context, ir_op *op);
/** This hook is called, after a new IR-node was created and before it is optimized. */
void (*_hook_new_node)(void *context, ir_node *node);
......@@ -114,8 +108,6 @@ struct hook_entry {
* possible hooks
*/
typedef enum {
hook_new_ir_op, /**< type for hook_new_ir_op() hook */
hook_free_ir_op, /**< type for hook_free_ir_op() hook */
hook_new_node, /**< type for hook_new_node() hook */
hook_set_irn_n, /**< type for hook_set_irn_n() hook */
hook_replace, /**< type for hook_replace() hook */
......@@ -175,10 +167,6 @@ extern hook_entry_t *hooks[hook_last];
} \
} while (0)
/** Called when a new node opcode has been created */
#define hook_new_ir_op(op) hook_exec(hook_new_ir_op, (hook_ctx_, op))
/** Called when a node opcode has been freed */
#define hook_free_ir_op(op) hook_exec(hook_free_ir_op, (hook_ctx_, op))
/** Called after a new node has been created */
#define hook_new_node(node) hook_exec(hook_new_node, (hook_ctx_, node))
/** Called when a nodes input is changed */
......
......@@ -80,14 +80,11 @@ ir_op *new_ir_op(unsigned code, const char *name, op_pin_state p,
panic("opcode registered twice");
opcodes[code] = res;
hook_new_ir_op(res);
return res;
}
void free_ir_op(ir_op *code)
{
hook_free_ir_op(code);
assert(opcodes[code->code] == code);
opcodes[code->code] = NULL;
......
Supports Markdown
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