Re: [PATCH v2] implement constant-folding in __builtin_bswap*()

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

 



> There is other possible __builtin_xxx() function gcc expected to get
> a const result when the input arguments are constant.  Ideally, we
> should be able to mark __builtin_bswap16 as a special constant "pass
> through" function. So during the evaluation and constant propagation,
> sparse can pass through the native __builtin_xxx() call to get the
> const result. In other words, sparse shouldn't need to implement
> "__builtin_bswap16()" by itself. It can just call to the gcc
> one to get the result. Then we can treat all other similar
> __builtin_xxx function the same way.

Yes, that'd make some sense. I have no idea how to pull it off though
:)

johannes
--
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