linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 00/34] ptrlist rework with iterator
@ 2017-07-07 13:39 Luc Van Oostenryck
  2017-07-07 13:39 ` [PATCH 01/34] ptrlist: simplify DO_FOR_EACH/DO_END_FOR_EACH Luc Van Oostenryck
                   ` (35 more replies)
  0 siblings, 36 replies; 42+ messages in thread
From: Luc Van Oostenryck @ 2017-07-07 13:39 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Linus Torvalds, Luc Van Oostenryck

Here is some patches reworking the whole ptrlist API
which move all the logic currently present in the macros
in a small set of primitive functions using an iterator
structure.

It's in the state I left it in November.
It's OK for the testsuite and IIRC was fine when using
on the kernel too.
I didn't saw any appreciable speed change when using it.

By no means will this solve our current problem with the
nested list walking but it is, IMO, a much cleaner base
to work on.


Luc Van Oostenryck (34):
  ptrlist: simplify DO_FOR_EACH/DO_END_FOR_EACH
  ptrlist: simplify DO_FOR_EACH_REVERSE/...
  ptrlist: simplify DO_NEXT link walking
  ptrlist: add helper __PTR_STRIP_TAG()
  ptrlist: introduce the ptr_list iterator structure
  ptrlist: add ptr_cur_entry() to get iterator's current entry
  ptrlist: add forward iterator
  ptrlist: let first_ptr_list() use the iterator API
  ptrlist: add backward iterator
  ptrlist: let lastst_ptr_list() use the iterator API
  ptrlist: mechanically replace head-list-nr triplets by an iterator struct
  ptrlist: simplify initialization of DO_REVERSE()'s cursor
  ptrlist: abstract away iterator initialization
  ptrlist: CUR_ENTRY/CUR_ENTRY_NOTAG
  ptrlist: use iterator API for PREPARE/NEXT_PTR_LIST()
  ptrlist: use iterator API for RESET_PTR_LIST()
  ptrlist: use iterator for FOR_EACH_PTR()
  ptrlist: use iterator for FOR_EACH_PTR_REVERSE()
  ptrlist: remove unneeded DO_INIT()
  ptrlist: use the iterator API for DO_INSERT_CURRENT()
  ptrlist: extract ptr_cur_insert from ptrlist.h
  ptrlist: simplify ptr_cur_insert()
  ptrlist: use the iterator API for DO_DELETE_CURRENT()
  ptrlist: extract prt_cur_delete() from ptrlist.h
  ptrlist: let delete_ptr_list() use the iterator API
  ptrlist: let replace_ptr_list_entry() use the iterator API
  ptrlist: let concat_ptr_list() use the iterator API
  ptrlist: let undo_ptr_list_last() use the iterator API
  ptrlist: let delete_ptr_list_last() use the iterator API
  ptrlist: simplify common case for __add_ptr_list()
  ptrlist: explicitely tagged
  ptrlist: tag/notag common case
  ptrlist: drop the now unneeded _NOTAG versions
  ptrlist: addr vs entry

 c2xml.c          |   4 +-
 compile.c        |   4 +-
 ctags.c          |   4 +-
 example.c        |  20 ++--
 graph.c          |   8 +-
 obfuscate.c      |   4 +-
 ptrlist.c        | 217 ++++++++++++++++++++++++++++++++---------
 ptrlist.h        | 286 ++++++++++++++++++++++---------------------------------
 sparse-llvm.c    |   4 +-
 sparse.c         |   4 +-
 test-dissect.c   |   4 +-
 test-inspect.c   |   4 +-
 test-lexing.c    |   4 +-
 test-linearize.c |   4 +-
 test-parsing.c   |   4 +-
 test-unssa.c     |   4 +-
 16 files changed, 323 insertions(+), 256 deletions(-)

-- 
2.13.0


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

end of thread, other threads:[~2017-07-09 10:34 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-07 13:39 [RFC 00/34] ptrlist rework with iterator Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 01/34] ptrlist: simplify DO_FOR_EACH/DO_END_FOR_EACH Luc Van Oostenryck
2017-07-08 15:31   ` Christopher Li
2017-07-07 13:39 ` [PATCH 02/34] ptrlist: simplify DO_FOR_EACH_REVERSE/ Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 03/34] ptrlist: simplify DO_NEXT link walking Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 04/34] ptrlist: add helper __PTR_STRIP_TAG() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 05/34] ptrlist: introduce the ptr_list iterator structure Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 06/34] ptrlist: add ptr_cur_entry() to get iterator's current entry Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 07/34] ptrlist: add forward iterator Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 08/34] ptrlist: let first_ptr_list() use the iterator API Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 09/34] ptrlist: add backward iterator Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 10/34] ptrlist: let lastst_ptr_list() use the iterator API Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 11/34] ptrlist: mechanically replace head-list-nr triplets by an iterator struct Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 12/34] ptrlist: simplify initialization of DO_REVERSE()'s cursor Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 13/34] ptrlist: abstract away iterator initialization Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 14/34] ptrlist: CUR_ENTRY/CUR_ENTRY_NOTAG Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 15/34] ptrlist: use iterator API for PREPARE/NEXT_PTR_LIST() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 16/34] ptrlist: use iterator API for RESET_PTR_LIST() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 17/34] ptrlist: use iterator for FOR_EACH_PTR() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 18/34] ptrlist: use iterator for FOR_EACH_PTR_REVERSE() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 19/34] ptrlist: remove unneeded DO_INIT() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 20/34] ptrlist: use the iterator API for DO_INSERT_CURRENT() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 21/34] ptrlist: extract ptr_cur_insert from ptrlist.h Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 22/34] ptrlist: simplify ptr_cur_insert() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 23/34] ptrlist: use the iterator API for DO_DELETE_CURRENT() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 24/34] ptrlist: extract prt_cur_delete() from ptrlist.h Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 25/34] ptrlist: let delete_ptr_list() use the iterator API Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 26/34] ptrlist: let replace_ptr_list_entry() " Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 27/34] ptrlist: let concat_ptr_list() " Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 28/34] ptrlist: let undo_ptr_list_last() " Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 29/34] ptrlist: let delete_ptr_list_last() " Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 30/34] ptrlist: simplify common case for __add_ptr_list() Luc Van Oostenryck
2017-07-07 13:39 ` [PATCH 31/34] ptrlist: explicitely tagged Luc Van Oostenryck
2017-07-07 13:40 ` [PATCH 32/34] ptrlist: tag/notag common case Luc Van Oostenryck
2017-07-07 13:40 ` [PATCH 33/34] ptrlist: drop the now unneeded _NOTAG versions Luc Van Oostenryck
2017-07-07 13:40 ` [PATCH 34/34] ptrlist: addr vs entry Luc Van Oostenryck
2017-07-07 13:51 ` [RFC 00/34] ptrlist rework with iterator Luc Van Oostenryck
2017-07-08 15:13 ` Christopher Li
2017-07-09  6:50   ` Luc Van Oostenryck
2017-07-09  8:25     ` Christopher Li
2017-07-09  9:52       ` Luc Van Oostenryck
2017-07-09 10:34         ` Dibyendu Majumdar

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