1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests
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
..
ADT [ADT] Make filter_iterator support bidirectional iteration 2018-04-25 21:50:09 +00:00
Analysis [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
AsmParser
BinaryFormat [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [CodeGen] Print user-friendly debug locations as MI comments 2018-04-24 11:00:46 +00:00
DebugInfo [ObjectYAML] Add ability for DWARFYAML to calculate DIE lengths 2018-04-20 12:33:49 +00:00
Demangle Fix another bot failure from r329951. 2018-04-13 02:53:26 +00:00
ExecutionEngine Link to AggressiveInstCombine in a few places. Unbreaks build for me. 2018-04-24 08:40:37 +00:00
FuzzMutate
IR [ADT] Make filter_iterator support bidirectional iteration 2018-04-25 21:50:09 +00:00
LineEditor
Linker
MC
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object
ObjectYAML
Option
Passes Fix PluginsTests failure on Windows buildbots by enabling it everywhere 2018-04-25 20:16:24 +00:00
ProfileData [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
Support [Support/Path] Add more tests and improve failure messages of existing ones 2018-04-24 08:29:20 +00:00
Target
tools Revert r330027: "[llvm-exegesis] re-enable failing tests after r330026." 2018-04-13 15:19:16 +00:00
Transforms Revert "Revert r330403 and r330413." 2018-04-20 13:34:32 +00:00
XRay
CMakeLists.txt [demangler] Add a partial demangling API for LLDB. 2018-04-12 20:41:38 +00:00