Add or Remove operation complete, and not while building the intermediate tree.
This trades a little bit more memory usage for less accesses to the FoldingSet. On a benchmark for the clang static analyzer, this shaves off another 13% of execution time when using field/array sensitivity.
llvm-svn: 80955
BumpPtrAllocator argument to their constructors. This BumpPtrAllocator
will be used to allocate trees. If no BumpPtrAllocator is provided, one
is created (as before).
llvm-svn: 46975
unique ImutAVLTree* for profiling.
Modified ImutAVLTree:
(1) changed ComputeHash() to ComputeDigest() and
(2) changed Profile() to use the computed digest and
(3) modified insertion of IMutAVLTree into the FoldingSet owned by
the ImutAVLTreeFactory object to use profiling instead of computing
a direct hash. This fixes a bug where our abuse of the FoldingSet would
not work when the FoldingSet was resized.
llvm-svn: 46753
an iterator, since the implementation returned an iterator that pointed to a
different node! Renamed this implementation to SlimFind() so that users do not
expect it to return an iterator (it is a more efficient implementation than
returning an iterator if the user just wants to find the value of a key).
Added a FIXME to implement ImmutableMap::find() that returns an iterator.
llvm-svn: 46150
and not just the key value when comparing trees. To do this we added data_type
and data_type_ref to the ImutContainerInfo trait classes. For values stored in
the tree that do not have separate key and data components, data_type is simply
a typedef of bool, and isDataEqual() always evaluates to true. This allows us to
support both ImmutableSet and ImmutableMap using the same underlying logic.
llvm-svn: 46130
implemented on top of a functional AVL tree. The AVL balancing code
is inspired by the OCaml implementation of Map, which also uses a functional
AVL tree.
Documentation is currently limited and cleanups are planned, but this code
compiles and has been tested.
llvm-svn: 42813