src/lima/gp_ir/reg_eliminate.c
//Check whether we can move the definition to the use
Check whether we can move the definition to the use
Check whether we can move the definition to the use
static bool can_move(lima_gp_ir_node_t* def, lima_gp_ir_node_t* use)
{
	if (!has_temp_read(def))
		return true;
	lima_gp_ir_root_node_t* node;
	for (node = def->successor; node != use->successor;
		 node = gp_ir_node_next(node))
	{
		if (node->node.op == lima_gp_ir_op_store_temp)
			return false;
	}
	return true;
}
static bool can_move ( lima_gp_ir_node_t * def , lima_gp_ir_node_t * use ) { if ( ! has_temp_read ( def ) ) return true ; lima_gp_ir_root_node_t * node ; for ( node = def -> successor ; node != use -> successor ; node = gp_ir_node_next ( node ) ) { if ( node -> node . op == lima_gp_ir_op_store_temp ) return false ; } return true ; }
Check whether we can move the definition to the use
Check whether we can move the definition to the use