75fda2e0a5
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 |
||
---|---|---|
.. | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include | ||
lib | ||
projects | ||
resources | ||
runtimes | ||
test | ||
tools | ||
unittests | ||
utils | ||
.arcconfig | ||
.clang-format | ||
.clang-tidy | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
LLVMBuild.txt | ||
README.txt | ||
RELEASE_TESTERS.TXT | ||
configure | ||
llvm.spec.in |
README.txt
Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the documentation provided in docs/ for further assistance with LLVM, and in particular docs/GettingStarted.rst for getting started with LLVM and docs/README.txt for an overview of LLVM's documentation setup. If you are writing a package for LLVM, see docs/Packaging.rst for our suggestions.