Re: [PATCH] fix casts when linearizing compound assignments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 8, 2012, at 6:47 AM, Xi Wang wrote:
> -		oldvalue = cast_pseudo(ep, oldvalue, src->ctype, expr->ctype);
> -		opcode = opcode_sign(op_trans[expr->op - SPECIAL_BASE], src->ctype);
> -		dst = add_binary_op(ep, src->ctype, opcode, oldvalue, value);
> -		value = cast_pseudo(ep, dst, expr->ctype, src->ctype);
> +		opcode = opcode_sign(op_trans[expr->op - SPECIAL_BASE], expr->ctype);
> +		value = cast_pseudo(ep, value, src->ctype, expr->ctype);
> +		value = add_binary_op(ep, expr->ctype, opcode, oldvalue, value);

For sparse-llvm, is it better to get rid of the cast_pseudo()
at all?

For example, what to emit for p += 1:

1) pointer p + integer 1,

2) pointer + pointer [cast from integer], or

3) (pointer)(integer [cast from pointer] + integer)?

- xi
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux