LLVM 22.0.0git
DepthFirstIterator.h File Reference

This file builds on the ADT/GraphTraits.h file to build generic depth first graph iterator. More...

#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/iterator_range.h"
#include <iterator>
#include <optional>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  llvm::df_iterator_storage< SetType, External >
class  llvm::df_iterator_storage< SetType, true >
struct  llvm::df_iterator_default_set< NodeRef, SmallSize >
class  llvm::df_iterator< GraphT, SetType, ExtStorage, GT >
struct  llvm::df_ext_iterator< T, SetTy >
struct  llvm::idf_iterator< T, SetTy, External >
struct  llvm::idf_ext_iterator< T, SetTy >

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

template<class T>
df_iterator< Tllvm::df_begin (const T &G)
template<class T>
df_iterator< Tllvm::df_end (const T &G)
template<class T>
iterator_range< df_iterator< T > > llvm::depth_first (const T &G)
template<class T, class SetTy>
df_ext_iterator< T, SetTy > llvm::df_ext_begin (const T &G, SetTy &S)
template<class T, class SetTy>
df_ext_iterator< T, SetTy > llvm::df_ext_end (const T &G, SetTy &S)
template<class T, class SetTy>
iterator_range< df_ext_iterator< T, SetTy > > llvm::depth_first_ext (const T &G, SetTy &S)
template<class T>
idf_iterator< Tllvm::idf_begin (const T &G)
template<class T>
idf_iterator< Tllvm::idf_end (const T &G)
template<class T>
iterator_range< idf_iterator< T > > llvm::inverse_depth_first (const T &G)
template<class T, class SetTy>
idf_ext_iterator< T, SetTy > llvm::idf_ext_begin (const T &G, SetTy &S)
template<class T, class SetTy>
idf_ext_iterator< T, SetTy > llvm::idf_ext_end (const T &G, SetTy &S)
template<class T, class SetTy>
iterator_range< idf_ext_iterator< T, SetTy > > llvm::inverse_depth_first_ext (const T &G, SetTy &S)

Detailed Description

This file builds on the ADT/GraphTraits.h file to build generic depth first graph iterator.

This file exposes the following functions/types:

df_begin/df_end/df_iterator

  • Normal depth-first iteration - visit a node and then all of its children.

idf_begin/idf_end/idf_iterator

  • Depth-first iteration on the 'inverse' graph.

df_ext_begin/df_ext_end/df_ext_iterator

  • Normal depth-first iteration - visit a node and then all of its children. This iterator stores the 'visited' set in an external set, which allows it to be more efficient, and allows external clients to use the set for other purposes.

idf_ext_begin/idf_ext_end/idf_ext_iterator

  • Depth-first iteration on the 'inverse' graph. This iterator stores the 'visited' set in an external set, which allows it to be more efficient, and allows external clients to use the set for other purposes.

Definition in file DepthFirstIterator.h.