1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/ADT
Vedant Kumar a042bc0c1b [ADT] Make filter_iterator support bidirectional iteration
This makes it possible to reverse a filtered range. For example, here's
a way to visit memory accesses in a BasicBlock in reverse order:

    auto MemInsts = reverse(make_filter_range(BB, [](Instruction &I) {
      return isa<StoreInst>(&I) || isa<LoadInst>(&I);
    }));

    for (auto &MI : MemInsts)
      ...

To implement this functionality, I factored out forward iteration
functionality into filter_iterator_base, and added a specialization of
filter_iterator_impl which supports bidirectional iteration. Thanks to
Tim Shen, Zachary Turner, and others for suggesting this design and
providing feedback! This version of the patch supersedes the original
(https://reviews.llvm.org/D45792).

This was motivated by a problem we encountered in D45657: we'd like to
visit the non-debug-info instructions in a BasicBlock in reverse order.

Testing: check-llvm, check-clang

Differential Revision: https://reviews.llvm.org/D45853

llvm-svn: 330875
2018-04-25 21:50:09 +00:00
..
APFloatTest.cpp Fix APFloat from string conversion for Inf 2017-12-19 04:27:39 +00:00
APIntTest.cpp Bring back APInt self-move assignment check for MSVC only 2018-04-24 21:41:50 +00:00
APSIntTest.cpp
ArrayRefTest.cpp Fix incorrect usage of std::is_assignable. 2018-02-02 22:29:54 +00:00
BitmaskEnumTest.cpp
BitVectorTest.cpp
BreadthFirstIteratorTest.cpp
BumpPtrListTest.cpp
CMakeLists.txt Re-commit: Make STATISTIC() values available programmatically 2018-03-05 19:38:16 +00:00
DAGDeltaAlgorithmTest.cpp
DeltaAlgorithmTest.cpp
DenseMapTest.cpp [unittests] ADT: silence -Wself-assign diagnostics 2018-04-07 10:37:18 +00:00
DenseSetTest.cpp Fix typos of occurred and occurrence 2018-01-24 10:33:39 +00:00
DepthFirstIteratorTest.cpp
EquivalenceClassesTest.cpp
FoldingSet.cpp
FunctionRefTest.cpp
HashingTest.cpp
IListBaseTest.cpp
IListIteratorTest.cpp
IListNodeBaseTest.cpp
IListNodeTest.cpp
IListSentinelTest.cpp
IListTest.cpp
ImmutableMapTest.cpp
ImmutableSetTest.cpp
IntEqClassesTest.cpp
IntervalMapTest.cpp
IntrusiveRefCntPtrTest.cpp
IteratorTest.cpp [ADT] Make filter_iterator support bidirectional iteration 2018-04-25 21:50:09 +00:00
MakeUniqueTest.cpp
MappedIteratorTest.cpp
MapVectorTest.cpp [ADT] Fix MapVector when 'Map::mapped_type != unsigned'. 2018-04-08 08:48:58 +00:00
OptionalTest.cpp [ADT] Make moving Optional not reset the Optional it moves from. 2018-01-25 17:24:22 +00:00
PackedVectorTest.cpp
PointerEmbeddedIntTest.cpp
PointerIntPairTest.cpp
PointerSumTypeTest.cpp
PointerUnionTest.cpp
PostOrderIteratorTest.cpp
PriorityWorklistTest.cpp
RangeAdapterTest.cpp
SCCIteratorTest.cpp
ScopeExitTest.cpp Give scope_exit helper correct move semantics 2018-01-25 16:55:48 +00:00
SequenceTest.cpp
SetVectorTest.cpp
SimpleIListTest.cpp
SmallPtrSetTest.cpp [unittests] ADT: silence -Wself-assign diagnostics 2018-04-07 10:37:18 +00:00
SmallStringTest.cpp
SmallVectorTest.cpp
SparseBitVectorTest.cpp [unittests] ADT: silence -Wself-assign diagnostics 2018-04-07 10:37:18 +00:00
SparseMultiSetTest.cpp
SparseSetTest.cpp
StatisticTest.cpp Fix unused function warning in StatisticTest.cpp 2018-03-08 15:52:45 +00:00
STLExtrasTest.cpp [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
StringExtrasTest.cpp [Support] Add unit test for printLowerCase 2017-11-28 16:11:56 +00:00
StringMapTest.cpp [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
StringRefTest.cpp Fix incorrect usage of std::is_assignable. 2018-02-02 22:29:54 +00:00
StringSwitchTest.cpp [ADT] Simplify and optimize StringSwitch 2018-02-26 18:41:26 +00:00
TestGraph.h
TinyPtrVectorTest.cpp Ensure moved-from container is cleared on move 2017-12-11 19:22:59 +00:00
TripleTest.cpp [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU 2018-03-23 18:45:18 +00:00
TwineTest.cpp
VariadicFunctionTest.cpp