Skip to content
  1. Jan 21, 2013
    • Michael Ilseman's avatar
      Introduce a new data structure, the SparseMultiSet, and changes to the MI scheduler to use it. · 3e3194f4
      Michael Ilseman authored
      A SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's desirable properties. Essentially, SparseMultiSet provides multiset behavior by storing its dense data in doubly linked lists that are inlined into the dense vector. This allows it to provide good data locality as well as vector-like constant-time clear() and fast constant time find(), insert(), and erase(). It also allows SparseMultiSet to have a builtin recycler rather than keeping SparseSet's behavior of always swapping upon removal, which allows it to preserve more iterators. It's often a better alternative to a SparseSet of a growable container or vector-of-vector.
      
      llvm-svn: 173064
      3e3194f4
  2. Oct 14, 2012
  3. Aug 30, 2012
  4. Jul 31, 2012
    • Chandler Carruth's avatar
      Bring TinyPtrVector under test. Somehow we never picked up unit tests · a565375a
      Chandler Carruth authored
      for this class. These tests exercise most of the basic properties, but
      the API for TinyPtrVector is very strange currently. My plan is to start
      fleshing out the API to match that of SmallVector, but I wanted a test
      for what is there first.
      
      Sadly, it doesn't look reasonable to just re-use the SmallVector tests,
      as this container can only ever store pointers, and much of the
      SmallVector testing is to get construction and destruction right.
      
      Just to get this basic test working, I had to add value_type to the
      interface.
      
      While here I found a subtle bug in the combination of 'erase', 'begin',
      and 'end'. Both 'begin' and 'end' wanted to use a null pointer to
      indicate the "end" iterator of an empty vector, regardless of whether
      there is actually a vector allocated or the pointer union is null.
      Everything else was fine with this except for erase. If you erase the
      last element of a vector after it has held more than one element, we
      return the end iterator of the underlying SmallVector which need not be
      a null pointer. Instead, simply use the pointer, and poniter + size()
      begin/end definitions in the tiny case, and delegate to the inner vector
      whenever it is present.
      
      llvm-svn: 161024
      a565375a
  5. Jun 21, 2012
    • Chandler Carruth's avatar
      Completely refactor the structuring of unittest CMake files to match the · 94d02518
      Chandler Carruth authored
      Makefiles, the CMake files in every other part of the LLVM tree, and
      sanity.
      
      This should also restore the output tree structure of all the unit
      tests, sorry for breaking that, and thanks for letting me know.
      
      The fundamental change is to put a CMakeLists.txt file in the unittest
      directory, with a single test binary produced from it. This has several
      advantages:
      
      - No more weird directory stripping in the unittest macro, allowing it
        to be used more readily in other projects.
      - No more directory prefixes on all the source files.
      - Allows correct and precise use of LLVM's per-directory dependency
        system.
      - Allows use of the checking logic for source files that have not been
        added to the CMake build. This uncovered a file being skipped with
        CMake in LLVM and one in Clang's unit tests.
      - Makes Specifying conditional compilation or other custom logic for JIT
        tests easier.
      
      It did require adding the concept of an explicit 'optional' source file
      to the CMake build so that the missing-file check can skip cases where
      the file is *supposed* to be missing. =]
      
      This is another chunk of refactoring the CMake build in order to make it
      usable for other clients like CompilerRT / ASan / TSan.
      
      Note that this is interdependent with a Clang CMake change.
      
      llvm-svn: 158909
      94d02518
Loading