From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Christopher Li <sparse@chrisli.org>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 0/6] fix boolean context
Date: Wed, 12 Apr 2017 21:33:38 +0200 [thread overview]
Message-ID: <20170412193344.95935-1-luc.vanoostenryck@gmail.com> (raw)
The goal of this series is to add explicit comparisons
against zero to create a boolean context when issuing
OP_AND_BOOL & OP_OR_BOOL. This is needed to fix an incorrect
simplification.
A consequence of adding this boolean context is that
OP_AND_BOOL and OP_OR_BOOL become unneeded and are simply
replaced by OP_AND and OP_OR.
This series is available at:
git://github.com/lucvoo/sparse.git bool-context
based on commits (a merge):
d4208cd1ef7df00f7d79dba1ccb365136d382914 (simplify-bool-mask)
462a61a21b1e3bb17abce88fb1bdbc93d9653245 (cse-canonical)
up to commit:
ac6c25bc066eab36942539ba11c7ab6cf0c63674
Luc Van Oostenryck (6):
fix boolean context for OP_AND_BOOL & OP_OR_BOOL
simplify intermediate casts in boolean expressions
avoid useless compare with zero
generate plain OP_{AND,OR} instead of OP_{AND,OR}_BOOL
llvm: no need to special-case OP_AND_BOOL and OP_OR_BOOL
remove OP_{AND,OR}_BOOL instructions
cse.c | 4 +---
example.c | 3 ---
linearize.c | 44 ++++++++++++++++++++++++++++++++----
linearize.h | 4 +---
simplify.c | 44 ++++++++++++++++--------------------
sparse-llvm.c | 24 --------------------
validation/optim/bool-context-fp.c | 46 ++++++++++++++++++++++++++++++++++++++
validation/optim/bool-context.c | 12 ++++++++++
validation/optim/bool-simplify.c | 30 +++++++++++++++++++++++--
validation/optim/bool-simplify2.c | 11 +++++++++
10 files changed, 158 insertions(+), 64 deletions(-)
create mode 100644 validation/optim/bool-context.c
create mode 100644 validation/optim/bool-simplify2.c
--
2.12.0
next reply other threads:[~2017-04-12 19:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 19:33 Luc Van Oostenryck [this message]
2017-04-12 19:33 ` [PATCH 1/6] fix boolean context for OP_AND_BOOL & OP_OR_BOOL Luc Van Oostenryck
2017-04-12 19:33 ` [PATCH 2/6] simplify intermediate casts in boolean expressions Luc Van Oostenryck
2017-04-12 19:33 ` [PATCH 3/6] avoid useless compare with zero Luc Van Oostenryck
2017-04-12 19:33 ` [PATCH 4/6] generate plain OP_{AND,OR} instead of OP_{AND,OR}_BOOL Luc Van Oostenryck
2017-04-12 19:33 ` [PATCH 5/6] llvm: no need to special-case OP_AND_BOOL and OP_OR_BOOL Luc Van Oostenryck
2017-04-12 19:33 ` [PATCH 6/6] remove OP_{AND,OR}_BOOL instructions Luc Van Oostenryck
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=20170412193344.95935-1-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.