src/lima/gp_ir/dce.c
//TODO: make this not dumb
//Adds the register write corresponding to any read in node or its children
//to the queue.
make this not dumb
Adds the register write corresponding to any read in node or its children
to the queue.
make this not dumb Adds the register write corresponding to any read in node or its children to the queue .
static void process_node(lima_gp_ir_node_t* node, fixed_queue_t* queue)
{
	if (node->op == lima_gp_ir_op_load_reg)
	{
		lima_gp_ir_load_reg_node_t* load_reg = gp_ir_node_to_load_reg(node);
		add_reg_to_queue(load_reg->reg, queue);
	}
	else
	{
		lima_gp_ir_child_node_iter_t iter;
		gp_ir_node_for_each_child(node, iter)
		{
			process_node(*iter.child, queue);
		}
	}
}
static void process_node ( lima_gp_ir_node_t * node , fixed_queue_t * queue ) { if ( node -> op == lima_gp_ir_op_load_reg ) { lima_gp_ir_load_reg_node_t * load_reg = gp_ir_node_to_load_reg ( node ) ; add_reg_to_queue ( load_reg -> reg , queue ) ; } else { lima_gp_ir_child_node_iter_t iter ; gp_ir_node_for_each_child ( node , iter ) { process_node ( * iter . child , queue ) ; } } }
TODO: make this not dumb
Adds the register write corresponding to any read in node or its children
to the queue.
TODO : make this not dumb Adds the register write corresponding to any read in node or its children to the queue .