Re: [RFC][PATCH 0/3] implement pseudo->ctype

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

 



On Jun 21, 2012, at 6:00 PM, Christopher Li wrote:
> 
> I like this series a lot. Do you have an update version of the patch?

I will resend a revised version of these patches.

With ->ctype in pseudo, we might have to disable several simplifications
in simplify.c and cse.c for type consistency.  One such example is:

	unsigned int foo(unsigned long long x)
	{
		unsigned int tmp = x & 0x1fffffff;
		return tmp;
	}

sparse emits:

	and.64      %r2 <- %arg1, $0x1fffffff
	ret.32      %r2

%r2 seems to be interpreted as both 64 and 32 bits, which will also
trouble backends.

To fix the inconsistency, we may need to disable some simplification:

https://github.com/xiw/sparse/commit/7072002

Then we have:

	and.64      %r2 <- %arg1, $0x1fffffff
	cast.32     %r3 <- (64) %r2
	ret.32      %r3

Does this make sense?  Or should we just provide an option to turn
off all sparse simplifications, since backends usually have their own
optimization passes?

- 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