Commit 6a3bc1a0 authored by Matthias Braun's avatar Matthias Braun
Browse files

irhooks: Remove hook_set_irn_n

parent 7237d36d
......@@ -418,10 +418,7 @@ void add_immBlock_pred(ir_node *block, ir_node *jmp)
assert(!get_Block_matured(block) && "Error: Block already matured!\n");
assert(jmp->kind == k_ir_node);
int const n = ARR_LEN(block->in) - 1;
ARR_APP1(ir_node *, block->in, jmp);
/* Call the hook */
hook_set_irn_n(block, n, jmp, NULL);
}
void set_cur_block(ir_node *target)
......
......@@ -28,10 +28,6 @@ struct hook_entry {
/** 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);
/** This hook is called, before a node input was changed. */
void (*_hook_set_irn_n)(void *context, ir_node *src,
int pos, ir_node *tgt, ir_node *old_tgt);
/** This hook is called, before a node is replaced (exchange()) by another. */
void (*_hook_replace)(void *context, ir_node *old_node, ir_node *new_node);
......@@ -109,7 +105,6 @@ struct hook_entry {
*/
typedef enum {
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 */
hook_turn_into_id, /**< type for hook_turn_into_id() hook */
hook_normalize, /**< type for hook_normalize() hook */
......@@ -169,9 +164,6 @@ extern hook_entry_t *hooks[hook_last];
/** 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 */
#define hook_set_irn_n(src, pos, tgt, old_tgt) \
hook_exec(hook_set_irn_n, (hook_ctx_, src, pos, tgt, old_tgt))
/** Called when a node is replaced */
#define hook_replace(old, nw) hook_exec(hook_replace, (hook_ctx_, old, nw))
/** Called when a node is turned into an Id node */
......
......@@ -191,9 +191,6 @@ void set_irn_n(ir_node *node, int n, ir_node *in)
assert(in && in->kind == k_ir_node);
assert(!is_Deleted(in));
/* Call the hook */
hook_set_irn_n(node, n, in, node->in[n + 1]);
/* Here, we rely on src and tgt being in the current ir graph */
edges_notify_edge(node, n, in, node->in[n + 1], irg);
......@@ -212,9 +209,6 @@ int add_irn_n(ir_node *node, ir_node *in)
ARR_APP1(ir_node *, node->in, in);
edges_notify_edge(node, pos, node->in[pos + 1], NULL, irg);
/* Call the hook */
hook_set_irn_n(node, pos, node->in[pos + 1], NULL);
/* update irg flags */
clear_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_OUTS);
......
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