Old fork of llvm-mirror, used on older RPCS3 builds
Go to file
Duncan P. N. Exon Smith f1f27bb03e 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<>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 16:23:55 +00:00
bindings
cmake [CMake] Make LLVMConfig.cmake variable names match in-tree names 2016-08-29 21:26:32 +00:00
docs docs: mention that clobbering output regs in inline asm is illegal. 2016-08-30 10:48:31 +00:00
examples Fix singlton -> singleton typo. 2016-08-26 02:00:21 +00:00
include ADT: Split out simple_ilist, a simple intrusive list 2016-08-30 16:23:55 +00:00
lib Fixup r279618, instantiate *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC>, instead of *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC,LazyCallGraph&>, for PassID. 2016-08-30 15:47:13 +00:00
projects
resources
runtimes [CMake] Builtins build needs LLVM_*_OUTPUT_INTDIR variables 2016-08-29 20:18:52 +00:00
test [SimplifyCFG] Properly CSE metadata in SinkThenElseCodeToEnd 2016-08-30 10:56:08 +00:00
tools [llvm-cov] Use the native path in the coverage report. 2016-08-30 07:01:37 +00:00
unittests ADT: Split out simple_ilist, a simple intrusive list 2016-08-30 16:23:55 +00:00
utils TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC 2016-08-26 22:29:36 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format
.clang-tidy
.gitignore [CMake] Add LLVM runtimes directory 2016-06-23 22:07:21 +00:00
CMakeLists.txt Hooking up a check-all target for the runtimes projects 2016-08-25 17:18:41 +00:00
CODE_OWNERS.TXT test commit 2016-08-02 19:25:17 +00:00
configure
CREDITS.TXT Shamelessly add myself to CREDITS.TXT 2016-08-04 16:28:22 +00:00
LICENSE.TXT Remove autoconf references from LICENSE.TXT 2016-08-12 20:11:03 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt Revert rL277454 2016-08-02 13:26:07 +00:00
RELEASE_TESTERS.TXT Adding RELEASE_TESTERS.TXT 2016-07-21 16:46:44 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.