LLVM 24.0.0git
llvm::Value::user_iterator_impl< UserTy > Class Template Reference

#include "llvm/IR/Value.h"

Inheritance diagram for llvm::Value::user_iterator_impl< UserTy >:
[legend]

Public Types

using iterator_category = std::forward_iterator_tag
using value_type = UserTy *
using difference_type = std::ptrdiff_t
using pointer = value_type *
using reference = value_type &

Public Member Functions

 user_iterator_impl ()=default
bool operator== (const user_iterator_impl &x) const
bool operator!= (const user_iterator_impl &x) const
bool atEnd () const
 Returns true if this iterator is equal to user_end() on the value.
user_iterator_imploperator++ ()
user_iterator_impl operator++ (int)
UserTy * operator* () const
UserTy * operator-> () const
 operator user_iterator_impl< const UserTy > () const
UsegetUse () const

Friends

class Value
class Instruction
 Iterator for Instructions in a `BasicBlock.

Detailed Description

template<typename UserTy>
class llvm::Value::user_iterator_impl< UserTy >

Definition at line 173 of file Value.h.

Member Typedef Documentation

◆ difference_type

template<typename UserTy>
using llvm::Value::user_iterator_impl< UserTy >::difference_type = std::ptrdiff_t

Definition at line 182 of file Value.h.

◆ iterator_category

template<typename UserTy>
using llvm::Value::user_iterator_impl< UserTy >::iterator_category = std::forward_iterator_tag

Definition at line 180 of file Value.h.

◆ pointer

template<typename UserTy>
using llvm::Value::user_iterator_impl< UserTy >::pointer = value_type *

Definition at line 183 of file Value.h.

◆ reference

template<typename UserTy>
using llvm::Value::user_iterator_impl< UserTy >::reference = value_type &

Definition at line 184 of file Value.h.

◆ value_type

template<typename UserTy>
using llvm::Value::user_iterator_impl< UserTy >::value_type = UserTy *

Definition at line 181 of file Value.h.

Constructor & Destructor Documentation

◆ user_iterator_impl()

Member Function Documentation

◆ atEnd()

template<typename UserTy>
bool llvm::Value::user_iterator_impl< UserTy >::atEnd ( ) const
inline

Returns true if this iterator is equal to user_end() on the value.

Definition at line 192 of file Value.h.

◆ getUse()

◆ operator user_iterator_impl< const UserTy >()

template<typename UserTy>
llvm::Value::user_iterator_impl< UserTy >::operator user_iterator_impl< const UserTy > ( ) const
inline

Definition at line 210 of file Value.h.

◆ operator!=()

template<typename UserTy>
bool llvm::Value::user_iterator_impl< UserTy >::operator!= ( const user_iterator_impl< UserTy > & x) const
inline

Definition at line 189 of file Value.h.

◆ operator*()

template<typename UserTy>
UserTy * llvm::Value::user_iterator_impl< UserTy >::operator* ( ) const
inline

Definition at line 206 of file Value.h.

Referenced by llvm::Value::user_iterator_impl< User >::operator->().

◆ operator++() [1/2]

template<typename UserTy>
user_iterator_impl & llvm::Value::user_iterator_impl< UserTy >::operator++ ( )
inline

Definition at line 194 of file Value.h.

◆ operator++() [2/2]

template<typename UserTy>
user_iterator_impl llvm::Value::user_iterator_impl< UserTy >::operator++ ( int )
inline

Definition at line 199 of file Value.h.

◆ operator->()

template<typename UserTy>
UserTy * llvm::Value::user_iterator_impl< UserTy >::operator-> ( ) const
inline

Definition at line 208 of file Value.h.

◆ operator==()

template<typename UserTy>
bool llvm::Value::user_iterator_impl< UserTy >::operator== ( const user_iterator_impl< UserTy > & x) const
inline

Definition at line 188 of file Value.h.

Referenced by llvm::Value::user_iterator_impl< User >::operator!=().

◆ Instruction

template<typename UserTy>
friend class Instruction
friend

Iterator for Instructions in a `BasicBlock.

/ \Returns an sandboxir::Instruction & when derereferenced. class BBIterator { public: using difference_type = std::ptrdiff_t; using value_type = Instruction; using pointer = value_type *; using reference = value_type &; using iterator_category = std::bidirectional_iterator_tag;

private: llvm::BasicBlock *BB; llvm::BasicBlock::iterator It; Context *Ctx; LLVM_ABI pointer getInstr(llvm::BasicBlock::iterator It) const;

public: BBIterator() : BB(nullptr), Ctx(nullptr) {} BBIterator(llvm::BasicBlock <em>BB, llvm::BasicBlock::iterator It, Context *Ctx) : BB(BB), It(It), Ctx(Ctx) {} reference operator() const { return *getInstr(It); } LLVM_ABI BBIterator &operator++(); BBIterator operator++(int) { auto Copy = *this; ++*this; return Copy; } LLVM_ABI BBIterator &operator--(); BBIterator operator--(int) { auto Copy = *this; –*this; return Copy; } bool operator==(const BBIterator &Other) const { assert(Ctx == Other.Ctx && "BBIterators in different context!"); return It == Other.It; } bool operator!=(const BBIterator &Other) const { return !(*this == Other); } / \Returns the SBInstruction that corresponds to this iterator, or null if / the instruction is not found in the IR-to-SandboxIR tables. pointer get() const { return getInstr(It); } / \Returns the parent BB. LLVM_ABI BasicBlock *getNodeParent() const; };

/ Contains a list of sandboxir::Instruction's. class BasicBlock : public Value { / Builds a graph that contains all values in BB in their original form / i.e., no vectorization is taking place here. LLVM_ABI void buildBasicBlockFromLLVMIR(llvm::BasicBlock *LLVMBB); friend class Context; // For buildBasicBlockFromIR

Definition at line 177 of file Value.h.

◆ Value

template<typename UserTy>
friend class Value
friend

Definition at line 176 of file Value.h.


The documentation for this class was generated from the following file: