linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/30] LLVM fixes
@ 2017-03-19  1:41 Luc Van Oostenryck
  2017-03-19  1:41 ` [PATCH v3 01/30] fix usage of inlined calls Luc Van Oostenryck
                   ` (31 more replies)
  0 siblings, 32 replies; 36+ messages in thread
From: Luc Van Oostenryck @ 2017-03-19  1:41 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Dibyendu Majumdar, 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.
Most of these issues have been reported and investigated by
Dibyendu Majumdar.

Changes since v2:
- remove the changes tha gave a type to PSEUDO_VALs
- introduction of OP_PUSH instructions
- move toward generic solution using the instruction's type
- some more fixes
- temporary remove changes related to OP_SYMADDR

* patches 1 & 2 are fixes/improvement of inlined call
	  unrelated to LLVM
* patch   3 add support of OP_PUSH and solve variadic + constant
* patches 4 & 5 add missing type to some instructions
* patches 6-14 are preparatory cleanups
* patch   15 fix a problme with floats & SYM_NODE
* patch   16 improve the typing of contants
* patches 17 & 18 are fixes
* patch	  19 fix issues with degenerated pointers
* patches 20-23 add test cases solved by patch 19
* patches 24-30 are fixes

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)
- there is a bunch of problems 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-v3


Luc Van Oostenryck (30):
  fix usage of inlined calls
  inlined calls should not block BB packing
  give function's arguments a type via OP_PUSH
  give a type to OP_PHISOURCE
  give a type to OP_SEL, always
  llvm: remove unneeded arg 'module'
  llvm: remove unneeded 'generation'
  llvm: remove unneeded function::type
  llvm: reduce scope of 'bb_nr'
  llvm: use pseudo_list_size() instead of open coding it
  llvm: give arguments a name
  llvm: give a name to call's return values
  llvm: avoid useless temp variable
  llvm: extract get_sym_value() from pseudo_to_value()
  llvm: fix test of floating-point type
  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: take care of degenerated rvalues
  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: fix type in comparison with an address constant
  llvm: give correct type to binops
  llvm: adjust OP_RET's type
  llvm: variadic functions are not being marked as such
  llvm: fix type of switch constants

 example.c                              |   4 +-
 flow.c                                 |   3 +-
 linearize.c                            |  53 +++--
 linearize.h                            |  12 +-
 liveness.c                             |  14 +-
 memops.c                               |   2 +-
 simplify.c                             |  11 +-
 sparse-llvm.c                          | 412 +++++++++++++++++++++------------
 validation/backend/compare-with-null.c |  12 +
 validation/backend/constant-pointer.c  |  24 ++
 validation/backend/degenerate-ptr.c    |  72 ++++++
 validation/backend/function-ptr.c      | 148 +++++++++++-
 validation/backend/pointer-add.c       |  54 +++++
 validation/backend/pointer-cmp.c       |   9 +
 validation/backend/pointer-param.c     |  42 ++++
 validation/backend/pointer-sub.c       |  17 ++
 validation/backend/store-x2.c          |  16 ++
 validation/backend/symaddr.c           |  70 ++++++
 validation/backend/type-constant.c     |  23 ++
 validation/call-inlined.c              |  58 +++++
 validation/call-variadic.c             |  31 +++
 validation/loop-linearization.c        |   9 +-
 validation/optim/call-inlined.c        |  30 +++
 23 files changed, 943 insertions(+), 183 deletions(-)
 create mode 100644 validation/backend/compare-with-null.c
 create mode 100644 validation/backend/constant-pointer.c
 create mode 100644 validation/backend/degenerate-ptr.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/pointer-sub.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/call-inlined.c
 create mode 100644 validation/call-variadic.c
 create mode 100644 validation/optim/call-inlined.c

-- 
2.12.0


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

end of thread, other threads:[~2017-03-19 21:11 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-19  1:41 [PATCH 00/30] LLVM fixes Luc Van Oostenryck
2017-03-19  1:41 ` [PATCH v3 01/30] fix usage of inlined calls Luc Van Oostenryck
2017-03-19  1:41 ` [PATCH v3 02/30] inlined calls should not block BB packing Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 03/30] give function's arguments a type via OP_PUSH Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 04/30] give a type to OP_PHISOURCE Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 05/30] give a type to OP_SEL, always Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 06/30] llvm: remove unneeded arg 'module' Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 07/30] llvm: remove unneeded 'generation' Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 08/30] llvm: remove unneeded function::type Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 09/30] llvm: reduce scope of 'bb_nr' Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 10/30] llvm: use pseudo_list_size() instead of open coding it Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 11/30] llvm: give arguments a name Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 12/30] llvm: give a name to call's return values Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 13/30] llvm: avoid useless temp variable Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 14/30] llvm: extract get_sym_value() from pseudo_to_value() Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 15/30] llvm: fix test of floating-point type Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 16/30] llvm: fix translation of PSEUDO_VALs into a ValueRefs Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 17/30] llvm: fix output_op_store() which modify its operand Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 18/30] llvm: fix output_op_[ptr]cast() Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 19/30] llvm: take care of degenerated rvalues Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 20/30] llvm: add test cases for symbol's address Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 21/30] llvm: add test cases for pointers passed as argument Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 22/30] llvm: add test cases for arrays " Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 23/30] llvm: add test cases for degenerated pointers Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 24/30] llvm: add support for OP_NEG Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 25/30] llvm: fix pointer/float mixup in comparisons Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 26/30] llvm: fix type in comparison with an address constant Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 27/30] llvm: give correct type to binops Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 28/30] llvm: adjust OP_RET's type Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 29/30] llvm: variadic functions are not being marked as such Luc Van Oostenryck
2017-03-19  1:42 ` [PATCH v3 30/30] llvm: fix type of switch constants Luc Van Oostenryck
2017-03-19 16:09 ` [PATCH 00/30] LLVM fixes Dibyendu Majumdar
2017-03-19 18:41   ` Dibyendu Majumdar
2017-03-19 16:28 ` Christopher Li
2017-03-19 16:51   ` Luc Van Oostenryck
2017-03-19 21:02     ` Luc Van Oostenryck

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