mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-28 06:00:30 +00:00
bf540e5abf
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330875 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
APFloatTest.cpp | ||
APIntTest.cpp | ||
APSIntTest.cpp | ||
ArrayRefTest.cpp | ||
BitmaskEnumTest.cpp | ||
BitVectorTest.cpp | ||
BreadthFirstIteratorTest.cpp | ||
BumpPtrListTest.cpp | ||
CMakeLists.txt | ||
DAGDeltaAlgorithmTest.cpp | ||
DeltaAlgorithmTest.cpp | ||
DenseMapTest.cpp | ||
DenseSetTest.cpp | ||
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 | ||
MakeUniqueTest.cpp | ||
MappedIteratorTest.cpp | ||
MapVectorTest.cpp | ||
OptionalTest.cpp | ||
PackedVectorTest.cpp | ||
PointerEmbeddedIntTest.cpp | ||
PointerIntPairTest.cpp | ||
PointerSumTypeTest.cpp | ||
PointerUnionTest.cpp | ||
PostOrderIteratorTest.cpp | ||
PriorityWorklistTest.cpp | ||
RangeAdapterTest.cpp | ||
SCCIteratorTest.cpp | ||
ScopeExitTest.cpp | ||
SequenceTest.cpp | ||
SetVectorTest.cpp | ||
SimpleIListTest.cpp | ||
SmallPtrSetTest.cpp | ||
SmallStringTest.cpp | ||
SmallVectorTest.cpp | ||
SparseBitVectorTest.cpp | ||
SparseMultiSetTest.cpp | ||
SparseSetTest.cpp | ||
StatisticTest.cpp | ||
STLExtrasTest.cpp | ||
StringExtrasTest.cpp | ||
StringMapTest.cpp | ||
StringRefTest.cpp | ||
StringSwitchTest.cpp | ||
TestGraph.h | ||
TinyPtrVectorTest.cpp | ||
TripleTest.cpp | ||
TwineTest.cpp | ||
VariadicFunctionTest.cpp |