From: Johannes Berg <johannes@sipsolutions.net>
To: Christopher Li <sparse@chrisli.org>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH v2] implement constant-folding in __builtin_bswap*()
Date: Mon, 21 Nov 2016 10:45:51 +0100 [thread overview]
Message-ID: <1479721551.8662.10.camel@sipsolutions.net> (raw)
In-Reply-To: <CANeU7Q=vFZ2CtMYjMEYSNcJmdEGbg+_f_wYCRwmKZh3Jc76jEA@mail.gmail.com> (sfid-20161121_033848_063837_43B872B5)
> 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
next prev parent reply other threads:[~2016-11-21 9:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 9:55 [PATCH v2] implement constant-folding in __builtin_bswap*() Johannes Berg
2016-11-21 2:38 ` Christopher Li
2016-11-21 9:45 ` Johannes Berg [this message]
2016-11-22 11:13 ` Christopher Li
2016-11-22 11:39 ` Christopher Li
2016-11-22 13:15 ` Luc Van Oostenryck
2016-11-22 16:32 ` Christopher Li
2016-11-22 17:12 ` Luc Van Oostenryck
2016-11-23 1:23 ` Christopher Li
2016-11-22 20:16 ` Luc Van Oostenryck
2016-11-23 1:25 ` Christopher Li
2016-11-23 20:38 ` [PATCH] add test case for builtin bswap with constant args Luc Van Oostenryck
2016-11-24 0:17 ` Christopher Li
2016-11-24 5:30 ` Christopher Li
2016-11-24 13:00 ` Luc Van Oostenryck
2016-11-23 20:48 ` [PATCH v2] implement constant-folding in __builtin_bswap*() Luc Van Oostenryck
2016-11-24 0:56 ` Christopher Li
2016-11-24 0:58 ` Christopher Li
2016-11-24 1:36 ` Luc Van Oostenryck
2016-11-24 3:17 ` Christopher Li
2016-11-24 1:31 ` Luc Van Oostenryck
2016-11-24 3:23 ` Christopher Li
2016-11-23 6:28 ` Johannes Berg
2016-11-23 14:30 ` Christopher Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479721551.8662.10.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).