src/lima/pp_hir/copy_propagation.c
//Tries to propagate the output modifier, if any, to the source of the move
Tries to propagate the output modifier, if any, to the source of the move
Tries to propagate the output modifier if any to the source of the move
static bool try_propagate_outmod(lima_pp_hir_cmd_t* move)
{
	if (move->dst.modifier == lima_pp_outmod_none)
		return true; 
	if (move->src[0].absolute || move->src[0].negate)
		return false;
	lima_pp_hir_cmd_t* source = move->src[0].depend;
	if (ptrset_size(source->cmd_uses) > 1 || ptrset_size(source->block_uses) > 0)
		return false;
	if (!lima_pp_hir_op[source->op].output_modifiers)
		return false;
	if (source->dst.modifier != lima_pp_outmod_none)
		return false;
	source->dst.modifier = move->dst.modifier;
	move->dst.modifier = lima_pp_outmod_none;
	return true;
}
static bool try_propagate_outmod ( lima_pp_hir_cmd_t * move ) { if ( move -> dst . modifier == lima_pp_outmod_none ) return true ; if ( move -> src [ 0 ] . absolute || move -> src [ 0 ] . negate ) return false ; lima_pp_hir_cmd_t * source = move -> src [ 0 ] . depend ; if ( ptrset_size ( source -> cmd_uses ) > 1 || ptrset_size ( source -> block_uses ) > 0 ) return false ; if ( ! lima_pp_hir_op [ source -> op ] . output_modifiers ) return false ; if ( source -> dst . modifier != lima_pp_outmod_none ) return false ; source -> dst . modifier = move -> dst . modifier ; move -> dst . modifier = lima_pp_outmod_none ; return true ; }
Tries to propagate the output modifier, if any, to the source of the move
Tries to propagate the output modifier if any to the source of the move
//Nothing to do here