Commit 2d977601 authored by Matthias Braun's avatar Matthias Braun
Browse files

firm already had kill_node, no need to be_kill_node

[r20885]
parent b0d9cc1c
......@@ -736,7 +736,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
/* kill the ProjT node */
if (res_proj != NULL) {
be_kill_node(res_proj);
kill_node(res_proj);
}
/* Make additional projs for the caller save registers
......@@ -1423,7 +1423,7 @@ static ir_node *create_be_return(be_abi_irg_t *env, ir_node *irn, ir_node *bl,
stack = be_abi_reg_map_get(env->regs, arch_env->sp);
if (keep) {
stack = get_irn_n(keep, 0);
be_kill_node(keep);
kill_node(keep);
remove_End_keepalive(get_irg_end(env->birg->irg), keep);
}
......@@ -1746,7 +1746,7 @@ static void modify_irg(be_abi_irg_t *env)
/* value_param_base anchor is not needed anymore now */
value_param_base = get_irg_value_param_base(irg);
be_kill_node(value_param_base);
kill_node(value_param_base);
set_irg_value_param_base(irg, new_r_Bad(irg));
env->frame = obstack_alloc(&env->obst, sizeof(env->frame[0]));
......@@ -1942,7 +1942,7 @@ static void modify_irg(be_abi_irg_t *env)
/* the arg proj is not needed anymore now and should be only used by the anchor */
assert(get_irn_n_edges(arg_tuple) == 1);
be_kill_node(arg_tuple);
kill_node(arg_tuple);
set_irg_args(irg, new_rd_Bad(irg));
/* All Return nodes hang on the End node, so look for them there. */
......
......@@ -53,6 +53,7 @@
#include "iredges_t.h"
#include "irgraph_t.h"
#include "irgopt.h"
#include "irgmod.h"
#include "irprintf_t.h"
#include "irgwalk.h"
......@@ -216,7 +217,7 @@ static void remove_empty_block(ir_node *block)
}
set_Block_cfgpred(block, 0, new_Bad());
be_kill_node(jump);
kill_node(jump);
blocks_removed = 1;
/* check predecessor */
......
......@@ -504,7 +504,7 @@ static void lower_perm_node(ir_node *irn, void *walk_env) {
/* remove the perm from schedule */
if (! keep_perm) {
sched_remove(irn);
be_kill_node(irn);
kill_node(irn);
}
}
......@@ -754,7 +754,7 @@ static void melt_copykeeps(constraint_env_t *cenv) {
/* now, we can kill the melted keep, except the */
/* ref one, we still need some information */
if (melt_arr[j] != ref)
be_kill_node(melt_arr[j]);
kill_node(melt_arr[j]);
}
#ifdef KEEP_ALIVE_COPYKEEP_HACK
......@@ -781,7 +781,7 @@ static void melt_copykeeps(constraint_env_t *cenv) {
DBG((cenv->dbg, LEVEL_1, "created %+F, scheduled before %+F\n", new_ck, sched_pt));
/* finally: kill the reference copykeep */
be_kill_node(ref);
kill_node(ref);
}
}
......@@ -858,7 +858,7 @@ void assure_constraints(be_irg_t *birg) {
/* Set all ins (including the block) of the CopyKeep BAD to keep the verifier happy. */
sched_remove(cp);
be_kill_node(cp);
kill_node(cp);
}
}
......@@ -988,7 +988,7 @@ found_front:
/* and kill it */
set_Proj_pred(proj, new_Bad());
be_kill_node(proj);
kill_node(proj);
bitset_set(moved, input);
n_moved++;
......
......@@ -39,6 +39,7 @@
#include "iredges_t.h"
#include "ircons.h"
#include "irextbb.h"
#include "irgmod.h"
#include "debug.h"
#include "bemodule.h"
......@@ -171,7 +172,7 @@ static void remove_dead_nodes_walker(ir_node *block, void *data)
if(env->lv)
be_liveness_remove(env->lv, node);
sched_remove(node);
be_kill_node(node);
kill_node(node);
}
}
......
......@@ -219,28 +219,6 @@ unsigned get_num_reachable_nodes(ir_graph *irg) {
return num;
}
/**
* Sets all node inputs to BAD node.
*/
void be_kill_node(ir_node *irn) {
ir_graph *irg = get_irn_irg(irn);
assert(!is_Bad(irn));
#ifdef DEBUG_libfirm
{
int i, first;
first = 0 - ! is_Block(irn);
for (i = get_irn_arity(irn) - 1; i >= first; --i) {
set_irn_n(irn, i, get_irg_bad(irg));
}
}
#endif
edges_node_deleted(irn, irg);
}
/**
* Gets the Proj with number pn from irn.
*/
......
......@@ -135,12 +135,6 @@ void be_dump(ir_graph *irg, const char *suffix, void (*dumper)(ir_graph *, const
*/
unsigned get_num_reachable_nodes(ir_graph *irg);
/**
* Sets all node inputs to BAD node.
* @param irn The node to be killed.
*/
void be_kill_node(ir_node *irn);
/**
* Gets the Proj with number pn from irn.
*/
......
......@@ -502,7 +502,7 @@ static void ia32_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_
/* the old SP is not needed anymore (kill the proj) */
assert(is_Proj(curr_sp));
be_kill_node(curr_sp);
kill_node(curr_sp);
/* copy ebp to esp */
curr_sp = be_new_Copy(&ia32_reg_classes[CLASS_ia32_gp], irg, bl, curr_bp);
......
......@@ -202,7 +202,7 @@ static void ia32_transform_sub_to_neg_add(ir_node *irn, ia32_code_gen_t *cg) {
/* remove the old sub */
sched_remove(irn);
be_kill_node(irn);
kill_node(irn);
DBG_OPT_SUB2NEGADD(irn, res);
}
......
......@@ -559,14 +559,13 @@ static void peephole_Load_IncSP_to_pop(ir_node *irn)
set_Proj_pred(proj, pop);
}
/* we can remove the Load now */
sched_remove(load);
kill_node(load);
}
be_set_IncSP_offset(irn, -ofs);
be_set_IncSP_pred(irn, pred_sp);
}
......@@ -1082,7 +1081,7 @@ static INLINE void try_kill(ir_node *node)
sched_remove(node);
}
be_kill_node(node);
kill_node(node);
}
static void optimize_conv_store(ir_node *node)
......@@ -1116,9 +1115,9 @@ static void optimize_conv_store(ir_node *node)
set_irn_n(node, n_ia32_Store_val, get_irn_n(pred, n_ia32_Conv_I2I_val));
if(get_irn_n_edges(pred_proj) == 0) {
be_kill_node(pred_proj);
kill_node(pred_proj);
if(pred != pred_proj)
be_kill_node(pred);
kill_node(pred);
}
}
......@@ -1243,9 +1242,9 @@ static void optimize_conv_conv(ir_node *node)
exchange(node, result_conv);
if(get_irn_n_edges(pred_proj) == 0) {
be_kill_node(pred_proj);
kill_node(pred_proj);
if(pred != pred_proj)
be_kill_node(pred);
kill_node(pred);
}
optimize_conv_conv(result_conv);
}
......
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