1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/include/llvm
Duncan P. N. Exon Smith 9200890ea3 ADT: Split out simple_ilist, a simple intrusive list
Split out a new, low-level intrusive list type with clear semantics.
Unlike iplist (and ilist), all operations on simple_ilist are intrusive,
and simple_ilist never takes ownership of its nodes.  This enables an
intuitive API that has the right defaults for intrusive lists.
- insert() takes references (not pointers!) to nodes (in iplist/ilist,
  passing a reference will cause the node to be copied).
- erase() takes only iterators (like std::list), and does not destroy
  the nodes.
- remove() takes only references and has the same behaviour as erase().
- clear() does not destroy the nodes.
- The destructor does not destroy the nodes.
- New API {erase,remove,clear}AndDispose() take an extra Disposer
  functor for callsites that want to call some disposal routine (e.g.,
  std::default_delete).

This list is not currently configurable, and has no callbacks.

The initial motivation was to fix iplist<>::sort to work correctly (even
with callbacks in ilist_traits<>).  iplist<> uses simple_ilist<>::sort
directly.  The new test in unittests/IR/ModuleTest.cpp crashes without
this commit.

Fixing sort() via a low-level layer provided a good opportunity to:
- Unit test the low-level functionality thoroughly.
- Modernize the API, largely inspired by other intrusive list
  implementations.

Here's a sketch of a longer-term plan:
- Create BumpPtrList<>, a non-intrusive list implemented using
  simple_ilist<>, and use it for the Token list in
  lib/Support/YAMLParser.cpp.  This will factor out the only real use of
  createNode().
- Evolve the iplist<> and ilist<> APIs in the direction of
  simple_ilist<>, making allocation/deallocation explicit at call sites
  (similar to simple_ilist<>::eraseAndDispose()).
- Factor out remaining calls to createNode() and deleteNode() and remove
  the customization from ilist_traits<>.
- Transition uses of iplist<>/ilist<> that don't need callbacks over to
  simple_ilist<>.

llvm-svn: 280107
2016-08-30 16:23:55 +00:00
..
ADT ADT: Split out simple_ilist, a simple intrusive list 2016-08-30 16:23:55 +00:00
Analysis Fixup r279618, instantiate *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC>, instead of *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC,LazyCallGraph&>, for PassID. 2016-08-30 15:47:13 +00:00
AsmParser
Bitcode Constify some path in the bitcode writer (NFC) 2016-08-19 06:06:18 +00:00
CodeGen ADT: Give ilist<T>::reverse_iterator a handle to the current node 2016-08-30 00:13:12 +00:00
Config Use posix_fallocate instead of ftruncate. 2016-07-19 20:19:56 +00:00
DebugInfo Resubmit "Write the TPI stream from a PDB to Yaml." 2016-08-18 16:49:29 +00:00
ExecutionEngine Revert "[ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather than" 2016-08-30 15:12:58 +00:00
IR Replace incorrect "#ifdef DEBUG" with "#ifndef NDEBUG". 2016-08-30 03:16:16 +00:00
IRReader [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LibDriver [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LineEditor Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Linker Linker: teach the IR mover to return llvm::Error. 2016-05-27 05:21:35 +00:00
LTO [ThinLTO] Move loading of cache entry to client 2016-08-26 23:29:14 +00:00
MC [MC] Move parser helper functions from Asmparser to MCAsmParser 2016-08-30 14:15:43 +00:00
Object llvm-objdump: Add Hexagon printer changes for -S/-l options 2016-08-18 21:50:13 +00:00
ObjectYAML [macho2yaml] Don't write empty linkedit data 2016-08-17 21:46:04 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
Passes [PM] Significantly refactor the pass pipeline parsing to be easier to 2016-08-03 03:21:41 +00:00
ProfileData [Coverage] Mark more methods const (NFC) 2016-07-22 21:11:55 +00:00
Support Revert "[ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather than" 2016-08-30 15:12:58 +00:00
TableGen [TableGen] Autobrief-ize Record. NFC. 2016-07-14 14:53:14 +00:00
Target [TargetLowering] remove fdiv and frem from canOpTrap() (PR29114) 2016-08-29 13:32:41 +00:00
Transforms [sanitizer-coverage] add two more modes of instrumentation: trace-div and trace-gep, mostly usaful for value-profile-based fuzzing; llvm part 2016-08-30 01:12:10 +00:00
CMakeLists.txt
InitializePasses.h [GlobalISel] Add a fallback path to SDISel. 2016-08-27 00:18:31 +00:00
LinkAllIR.h Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
LinkAllPasses.h [PM] Port the always inliner to the new pass manager in a much more 2016-08-17 02:56:20 +00:00
module.modulemap Update modulemap for Msf -> MSF rename. 2016-07-30 12:05:17 +00:00
module.modulemap.build
Pass.h Remove unused header. 2016-05-25 22:56:58 +00:00
PassAnalysisSupport.h Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
PassInfo.h
PassRegistry.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
PassSupport.h [LPM] Reinstate r271781 which reinstated r271652 to replace the 2016-06-04 19:57:55 +00:00