linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/27] LLVM fixes
@ 2017-03-11  9:06 Luc Van Oostenryck
  2017-03-11  9:06 ` [PATCH v2 01/27] give a type to OP_PHISOURCE Luc Van Oostenryck
                   ` (28 more replies)
  0 siblings, 29 replies; 53+ messages in thread
From: Luc Van Oostenryck @ 2017-03-11  9:06 UTC (permalink / raw)
  To: linux-sparse
  Cc: Christopher Li, Dibyendu Majumdar, Pekka Enberg, Jeff Garzik,
	Luc Van Oostenryck

This series solves a number of issues in sparse-llvm,
mainly about wrong or missing type information as needed
to build LLVM IR.
These issues have been reported and investigated by
Dibyendu Majumdar.

* patches 1-4 adds missing type info in sparse's IR
* patch   4 is not needed by this serie but logically belong
	  to the same group as patches 1-3. It can be dropped.
* patches 5-7 are fixes
* patch	  8 makes debugging easier
* patches 8-10 are preparatory steps for patch 11
* patches 11 & 12 are fixes
* patch   13 is a preparatory step for patch 14
* patch   14 solves a lot of issues
* patches 15-18 are test cases solved by patch 14
* patch   19 & 20 are fixes
* patches 21, 23-27 are cleanups
* patch   22 makes debugging easier
	  

These patches already allow to compile a lot more code to LLVM
but there is still known issues with sparse-llvm:
- it won't work on bitfields
- it won't work on computed gotos
- it won't work on label-as-value
- it won't work on exotic instructions (OP_SPLICE)
- few things are working correctly with floats
  (but this is not specific to sparse-llvm).
There is most probably a bunch of others issues too.

For convenience, this serie is also available at:
  https://github.com/lucvoo/sparse/tree/llvm-fixes-v2


Luc Van Oostenryck (27):
  give a type to OP_PHISOURCE
  give a type to OP_SEL, always
  give a type to OP_SYMADDR
  give a type to PSEUDO_ARGs
  llvm: fix translation of PSEUDO_VALs into a ValueRefs
  llvm: fix output_op_store() which modify its operand
  llvm: fix output_op_[ptr]cast()
  llvm: give a name to call return values
  llvm: add test cases for the type of constants
  add ptr_list_nth_entry()
  llvm: fix type of literal integer passed as arguments
  llvm: fix output OP_ADD mixed with pointers
  llvm: add support for OP_SYMADDR
  keep OP_SYMADDR instructions
  llvm: add test cases for symbol's address
  llvm: add test cases for pointers passed as argument
  llvm: add test cases for arrays passed as argument
  llvm: add test cases for degenerated pointers
  llvm: add support for OP_NEG
  llvm: fix pointer/float mixup in comparisons
  llvm: use pseudo_list_size() instead of open coding it
  llvm: give arguments a name
  llvm: remove unneeded arg 'module'
  llvm: remove unneeded arg 'fn'
  llvm: remove unneeded 'generation'
  llvm: remove unneeded function::type
  llvm: reduce scope of 'bb_nr'

 flow.c                              |   2 +-
 linearize.c                         |  31 +++--
 linearize.h                         |   8 +-
 memops.c                            |   2 +-
 ptrlist.c                           |  18 +++
 ptrlist.h                           |   1 +
 simplify.c                          |   2 +-
 sparse-llvm.c                       | 254 ++++++++++++++++++++++++++----------
 symbol.h                            |   5 +
 validation/backend/degenerate-ptr.c |  72 ++++++++++
 validation/backend/function-ptr.c   | 149 +++++++++++++++++++++
 validation/backend/null.c           |  24 ++++
 validation/backend/pointer-add.c    |  54 ++++++++
 validation/backend/pointer-cmp.c    |   9 ++
 validation/backend/pointer-param.c  |  42 ++++++
 validation/backend/store-x2.c       |  16 +++
 validation/backend/symaddr.c        |  70 ++++++++++
 validation/backend/type-constant.c  |  23 ++++
 validation/symaddr.c                |  35 +++++
 19 files changed, 724 insertions(+), 93 deletions(-)
 create mode 100644 validation/backend/degenerate-ptr.c
 create mode 100644 validation/backend/null.c
 create mode 100644 validation/backend/pointer-add.c
 create mode 100644 validation/backend/pointer-cmp.c
 create mode 100644 validation/backend/pointer-param.c
 create mode 100644 validation/backend/store-x2.c
 create mode 100644 validation/backend/symaddr.c
 create mode 100644 validation/backend/type-constant.c
 create mode 100644 validation/symaddr.c

-- 
2.11.1


^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2017-03-17 18:06 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11  9:06 [PATCH v2 00/27] LLVM fixes Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 01/27] give a type to OP_PHISOURCE Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 02/27] give a type to OP_SEL, always Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 03/27] give a type to OP_SYMADDR Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 04/27] give a type to PSEUDO_ARGs Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 05/27] llvm: fix translation of PSEUDO_VALs into a ValueRefs Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 06/27] llvm: fix output_op_store() which modify its operand Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 07/27] llvm: fix output_op_[ptr]cast() Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 08/27] llvm: give a name to call return values Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 09/27] llvm: add test cases for the type of constants Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 10/27] add ptr_list_nth_entry() Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 11/27] llvm: fix type of literal integer passed as arguments Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 12/27] llvm: fix output OP_ADD mixed with pointers Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 13/27] llvm: add support for OP_SYMADDR Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 14/27] keep OP_SYMADDR instructions Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 15/27] llvm: add test cases for symbol's address Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 16/27] llvm: add test cases for pointers passed as argument Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 17/27] llvm: add test cases for arrays " Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 18/27] llvm: add test cases for degenerated pointers Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 19/27] llvm: add support for OP_NEG Luc Van Oostenryck
2017-03-11  9:06 ` [PATCH v2 20/27] llvm: fix pointer/float mixup in comparisons Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 21/27] llvm: use pseudo_list_size() instead of open coding it Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 22/27] llvm: give arguments a name Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 23/27] llvm: remove unneeded arg 'module' Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 24/27] llvm: remove unneeded arg 'fn' Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 25/27] llvm: remove unneeded 'generation' Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 26/27] llvm: remove unneeded function::type Luc Van Oostenryck
2017-03-11  9:07 ` [PATCH v2 27/27] llvm: reduce scope of 'bb_nr' Luc Van Oostenryck
2017-03-11 11:12 ` [PATCH v2 00/27] LLVM fixes Dibyendu Majumdar
2017-03-11 11:49   ` Luc Van Oostenryck
2017-03-11 11:54     ` Dibyendu Majumdar
2017-03-11 12:30       ` Luc Van Oostenryck
2017-03-11 13:36         ` Dibyendu Majumdar
2017-03-11 14:12           ` Luc Van Oostenryck
2017-03-11 14:16             ` Dibyendu Majumdar
2017-03-11 14:28               ` Luc Van Oostenryck
2017-03-11 15:10               ` Jeff Garzik
2017-03-11 15:51                 ` Luc Van Oostenryck
2017-03-11 18:08                   ` Dibyendu Majumdar
2017-03-11 20:44                     ` Luc Van Oostenryck
2017-03-11 21:21                       ` Dibyendu Majumdar
2017-03-11 22:30                         ` Luc Van Oostenryck
2017-03-11 22:57                           ` Dibyendu Majumdar
2017-03-11 23:02                             ` Linus Torvalds
2017-03-11 23:04                               ` Dibyendu Majumdar
2017-03-11 23:12                                 ` Luc Van Oostenryck
2017-03-12  2:35     ` Dibyendu Majumdar
2017-03-14  6:18 ` Christopher Li
2017-03-16 16:41   ` Luc Van Oostenryck
2017-03-17 14:06     ` Dibyendu Majumdar
2017-03-17 17:04     ` Christopher Li
2017-03-17 17:41       ` Luc Van Oostenryck
2017-03-17 18:05         ` Christopher Li

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