src/lima/gp_ir/scheduler.c
/* tries to thread move nodes between node and its parents */
tries to thread move nodes between node and its parents
tries to thread move nodes between node and its parents
static bool try_thread_move_nodes(lima_gp_ir_node_t* node,
								  ptrset_t* moves_inserted, bool* success)
{
	lima_gp_ir_node_t* cur_node = node;
	while (true)
	{
		lima_gp_ir_node_t* move_node;
		if (!insert_move(cur_node, &move_node))
			return false;
		ptrset_add(moves_inserted, (void*)move_node);
		bool done, result;
		if (!try_place_move_node(move_node, cur_node, &result, &done))
			return false;
		if (!result)
		{
			*success = false;
			return true;
		}
		if (done)
		{
			*success = true;
			return true;
		}
		cur_node = move_node;
	}
	return false;
}
static bool try_thread_move_nodes ( lima_gp_ir_node_t * node , ptrset_t * moves_inserted , bool * success ) { lima_gp_ir_node_t * cur_node = node ; while ( true ) { lima_gp_ir_node_t * move_node ; if ( ! insert_move ( cur_node , & move_node ) ) return false ; ptrset_add ( moves_inserted , ( void * ) move_node ) ; bool done , result ; if ( ! try_place_move_node ( move_node , cur_node , & result , & done ) ) return false ; if ( ! result ) { * success = false ; return true ; } if ( done ) { * success = true ; return true ; } cur_node = move_node ; } return false ; }
tries to thread move nodes between node and its parents
tries to thread move nodes between node and its parents