Implement depth_first and inverse_depth_first range factory functions.
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 11 Apr 2014 01:50:01 +0000 (01:50 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 11 Apr 2014 01:50:01 +0000 (01:50 +0000)
commit77cf856e56dc568ebe760e7de820323fdcf825a4
tree377495323604a06e95c3199fe563498fc6139a70
parentae64ab542a8452e93c4d4c89295e086bb0cc49a2
Implement depth_first and inverse_depth_first range factory functions.

Also updated as many loops as I could find using df_begin/idf_begin -
strangely I found no uses of idf_begin. Is that just used out of tree?

Also a few places couldn't use df_begin because either they used the
member functions of the depth first iterators or had specific ordering
constraints (I added a comment in the latter case).

Based on a patch by Jim Grosbach. (Jim - you just had iterator_range<T>
where you needed iterator_range<idf_iterator<T>>)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206016 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/DepthFirstIterator.h
include/llvm/Analysis/LoopInfoImpl.h
lib/CodeGen/StackColoring.cpp
lib/Target/ARM64/ARM64ConditionalCompares.cpp
lib/Target/R600/AMDILCFGStructurizer.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
lib/Transforms/Instrumentation/MemorySanitizer.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Utils/SimplifyInstructions.cpp