Commit 0296b9e0 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

irhooks: Remove the parameter ir_graph* from hook_new_node.

It is unused and anyway redundant due to the given ir_node*.
parent edeb0f94
......@@ -186,13 +186,11 @@ static void dbg_printf(const char *fmt, ...)
* A new node is created.
*
* @param ctx the hook context
* @param irg the IR graph on which the node is created
* @param node the new IR node that was created
*/
static void dbg_new_node(void *ctx, ir_graph *irg, ir_node *node)
static void dbg_new_node(void *ctx, ir_node *node)
{
(void) ctx;
(void) irg;
bp_nr_t key;
key.nr = get_irn_node_nr(node);
......
......@@ -78,7 +78,7 @@ struct hook_entry {
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_graph *graph, ir_node *node);
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,
......@@ -235,7 +235,7 @@ extern hook_entry_t *hooks[hook_last];
/** 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(graph, node) hook_exec(hook_new_node, (hook_ctx_, graph, node))
#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))
......
......@@ -120,7 +120,7 @@ ir_node *new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op,
for (int i = 0; i < arity; ++i)
edges_notify_edge(res, i, res->in[i+1], NULL, irg);
hook_new_node(irg, res);
hook_new_node(res);
if (irg_is_constrained(irg, IR_GRAPH_CONSTRAINT_BACKEND)) {
be_info_new_node(irg, res);
}
......
......@@ -1351,13 +1351,11 @@ static void stat_free_ir_op(void *ctx, ir_op *op)
* Hook: A new node is created.
*
* @param ctx the hook context
* @param irg the IR graph on which the node is created
* @param node the new IR node that was created
*/
static void stat_new_node(void *ctx, ir_graph *irg, ir_node *node)
static void stat_new_node(void *ctx, ir_node *node)
{
(void) ctx;
(void) irg;
if (! status->stat_options)
return;
......
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