[PATCH 0/6] fix boolean context

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

 



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

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