LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MachineInstrBundleIterator< Ty, IsReverse > Class Template Reference

MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i.e. More...

#include "llvm/CodeGen/MachineInstrBundleIterator.h"

Inheritance diagram for llvm::MachineInstrBundleIterator< Ty, IsReverse >:
Inheritance graph
[legend]
Collaboration diagram for llvm::MachineInstrBundleIterator< Ty, IsReverse >:
Collaboration graph
[legend]

Public Types

using value_type = typename instr_iterator::value_type
 
using difference_type = typename instr_iterator::difference_type
 
using pointer = typename instr_iterator::pointer
 
using reference = typename instr_iterator::reference
 
using const_pointer = typename instr_iterator::const_pointer
 
using const_reference = typename instr_iterator::const_reference
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

 MachineInstrBundleIterator (instr_iterator MI)
 
 MachineInstrBundleIterator (reference MI)
 
 MachineInstrBundleIterator (pointer MI)
 
template<class OtherTy >
 MachineInstrBundleIterator (const MachineInstrBundleIterator< OtherTy, IsReverse > &I, typename std::enable_if< std::is_convertible< OtherTy *, Ty *>::value, void *>::type=nullptr)
 
 MachineInstrBundleIterator ()
 
 MachineInstrBundleIterator (const MachineInstrBundleIterator< Ty, !IsReverse > &I)
 Explicit conversion between forward/reverse iterators. More...
 
reference operator* () const
 
pointer operator-> () const
 
bool isValid () const
 Check for null. More...
 
MachineInstrBundleIteratoroperator-- ()
 
MachineInstrBundleIteratoroperator++ ()
 
MachineInstrBundleIterator operator-- (int)
 
MachineInstrBundleIterator operator++ (int)
 
instr_iterator getInstrIterator () const
 
nonconst_iterator getNonConstIterator () const
 
reverse_iterator getReverse () const
 Get a reverse iterator to the same node. More...
 

Static Public Member Functions

static MachineInstrBundleIterator getAtBundleBegin (instr_iterator MI)
 Get the bundle iterator for the given instruction's bundle. More...
 

Friends

bool operator== (const MachineInstrBundleIterator &L, const MachineInstrBundleIterator &R)
 
bool operator== (const MachineInstrBundleIterator &L, const const_instr_iterator &R)
 
bool operator== (const const_instr_iterator &L, const MachineInstrBundleIterator &R)
 
bool operator== (const MachineInstrBundleIterator &L, const nonconst_instr_iterator &R)
 
bool operator== (const nonconst_instr_iterator &L, const MachineInstrBundleIterator &R)
 
bool operator== (const MachineInstrBundleIterator &L, const_pointer R)
 
bool operator== (const_pointer L, const MachineInstrBundleIterator &R)
 
bool operator== (const MachineInstrBundleIterator &L, const_reference R)
 
bool operator== (const_reference L, const MachineInstrBundleIterator &R)
 
bool operator!= (const MachineInstrBundleIterator &L, const MachineInstrBundleIterator &R)
 
bool operator!= (const MachineInstrBundleIterator &L, const const_instr_iterator &R)
 
bool operator!= (const const_instr_iterator &L, const MachineInstrBundleIterator &R)
 
bool operator!= (const MachineInstrBundleIterator &L, const nonconst_instr_iterator &R)
 
bool operator!= (const nonconst_instr_iterator &L, const MachineInstrBundleIterator &R)
 
bool operator!= (const MachineInstrBundleIterator &L, const_pointer R)
 
bool operator!= (const_pointer L, const MachineInstrBundleIterator &R)
 
bool operator!= (const MachineInstrBundleIterator &L, const_reference R)
 
bool operator!= (const_reference L, const MachineInstrBundleIterator &R)
 

Detailed Description

template<typename Ty, bool IsReverse = false>
class llvm::MachineInstrBundleIterator< Ty, IsReverse >

MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i.e.

walk top level MIs only).

Definition at line 109 of file MachineInstrBundleIterator.h.

Member Typedef Documentation

◆ const_pointer

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::const_pointer = typename instr_iterator::const_pointer

Definition at line 120 of file MachineInstrBundleIterator.h.

◆ const_reference

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::const_reference = typename instr_iterator::const_reference

Definition at line 121 of file MachineInstrBundleIterator.h.

◆ difference_type

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::difference_type = typename instr_iterator::difference_type

Definition at line 117 of file MachineInstrBundleIterator.h.

◆ iterator_category

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::iterator_category = std::bidirectional_iterator_tag

Definition at line 122 of file MachineInstrBundleIterator.h.

◆ pointer

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::pointer = typename instr_iterator::pointer

Definition at line 118 of file MachineInstrBundleIterator.h.

◆ reference

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::reference = typename instr_iterator::reference

Definition at line 119 of file MachineInstrBundleIterator.h.

◆ value_type

template<typename Ty, bool IsReverse = false>
using llvm::MachineInstrBundleIterator< Ty, IsReverse >::value_type = typename instr_iterator::value_type

Definition at line 116 of file MachineInstrBundleIterator.h.

Constructor & Destructor Documentation

◆ MachineInstrBundleIterator() [1/6]

template<typename Ty, bool IsReverse = false>
llvm::MachineInstrBundleIterator< Ty, IsReverse >::MachineInstrBundleIterator ( instr_iterator  MI)
inline

Definition at line 133 of file MachineInstrBundleIterator.h.

◆ MachineInstrBundleIterator() [2/6]

template<typename Ty, bool IsReverse = false>
llvm::MachineInstrBundleIterator< Ty, IsReverse >::MachineInstrBundleIterator ( reference  MI)
inline

Definition at line 139 of file MachineInstrBundleIterator.h.

◆ MachineInstrBundleIterator() [3/6]

template<typename Ty, bool IsReverse = false>
llvm::MachineInstrBundleIterator< Ty, IsReverse >::MachineInstrBundleIterator ( pointer  MI)
inline

Definition at line 145 of file MachineInstrBundleIterator.h.

◆ MachineInstrBundleIterator() [4/6]

template<typename Ty, bool IsReverse = false>
template<class OtherTy >
llvm::MachineInstrBundleIterator< Ty, IsReverse >::MachineInstrBundleIterator ( const MachineInstrBundleIterator< OtherTy, IsReverse > &  I,
typename std::enable_if< std::is_convertible< OtherTy *, Ty *>::value, void *>::type  = nullptr 
)
inline

Definition at line 154 of file MachineInstrBundleIterator.h.

◆ MachineInstrBundleIterator() [5/6]

template<typename Ty, bool IsReverse = false>
llvm::MachineInstrBundleIterator< Ty, IsReverse >::MachineInstrBundleIterator ( )
inline

Definition at line 160 of file MachineInstrBundleIterator.h.

◆ MachineInstrBundleIterator() [6/6]

template<typename Ty, bool IsReverse = false>
llvm::MachineInstrBundleIterator< Ty, IsReverse >::MachineInstrBundleIterator ( const MachineInstrBundleIterator< Ty, !IsReverse > &  I)
inlineexplicit

Explicit conversion between forward/reverse iterators.

Translate between forward and reverse iterators without changing range boundaries. The resulting iterator will dereference (and have a handle) to the previous node, which is somewhat unexpected; but converting the two endpoints in a range will give the same range in reverse.

This matches std::reverse_iterator conversions.

Definition at line 170 of file MachineInstrBundleIterator.h.

Member Function Documentation

◆ getAtBundleBegin()

template<typename Ty, bool IsReverse = false>
static MachineInstrBundleIterator llvm::MachineInstrBundleIterator< Ty, IsReverse >::getAtBundleBegin ( instr_iterator  MI)
inlinestatic

Get the bundle iterator for the given instruction's bundle.

Definition at line 175 of file MachineInstrBundleIterator.h.

◆ getInstrIterator()

template<typename Ty, bool IsReverse = false>
instr_iterator llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator ( ) const
inline

◆ getNonConstIterator()

template<typename Ty, bool IsReverse = false>
nonconst_iterator llvm::MachineInstrBundleIterator< Ty, IsReverse >::getNonConstIterator ( ) const
inline

Definition at line 277 of file MachineInstrBundleIterator.h.

Referenced by priorNonDebug().

◆ getReverse()

template<typename Ty, bool IsReverse = false>
reverse_iterator llvm::MachineInstrBundleIterator< Ty, IsReverse >::getReverse ( ) const
inline

Get a reverse iterator to the same node.

Gives a reverse iterator that will dereference (and have a handle) to the same node. Converting the endpoint iterators in a range will give a different range; for range operations, use the explicit conversions.

Definition at line 284 of file MachineInstrBundleIterator.h.

Referenced by llvm::RISCVInstrInfo::analyzeBranch(), areCFlagsAccessedBetweenInstrs(), FindLastAluClause(), getNextBlock(), llvm::MachineInstrBundleIterator< const MachineInstr >::getReverse(), MoveAndTeeForMultiUse(), and llvm::X86InstrInfo::optimizeCompareInstr().

◆ isValid()

template<typename Ty, bool IsReverse = false>
bool llvm::MachineInstrBundleIterator< Ty, IsReverse >::isValid ( ) const
inline

Check for null.

Definition at line 183 of file MachineInstrBundleIterator.h.

Referenced by llvm::FastISel::removeDeadCode().

◆ operator*()

template<typename Ty, bool IsReverse = false>
reference llvm::MachineInstrBundleIterator< Ty, IsReverse >::operator* ( ) const
inline

Definition at line 179 of file MachineInstrBundleIterator.h.

◆ operator++() [1/2]

template<typename Ty, bool IsReverse = false>
MachineInstrBundleIterator& llvm::MachineInstrBundleIterator< Ty, IsReverse >::operator++ ( )
inline

Definition at line 260 of file MachineInstrBundleIterator.h.

◆ operator++() [2/2]

template<typename Ty, bool IsReverse = false>
MachineInstrBundleIterator llvm::MachineInstrBundleIterator< Ty, IsReverse >::operator++ ( int  )
inline

Definition at line 269 of file MachineInstrBundleIterator.h.

◆ operator--() [1/2]

template<typename Ty, bool IsReverse = false>
MachineInstrBundleIterator& llvm::MachineInstrBundleIterator< Ty, IsReverse >::operator-- ( )
inline

Definition at line 256 of file MachineInstrBundleIterator.h.

◆ operator--() [2/2]

template<typename Ty, bool IsReverse = false>
MachineInstrBundleIterator llvm::MachineInstrBundleIterator< Ty, IsReverse >::operator-- ( int  )
inline

Definition at line 264 of file MachineInstrBundleIterator.h.

◆ operator->()

template<typename Ty, bool IsReverse = false>
pointer llvm::MachineInstrBundleIterator< Ty, IsReverse >::operator-> ( ) const
inline

Definition at line 180 of file MachineInstrBundleIterator.h.

Friends And Related Function Documentation

◆ operator!= [1/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 220 of file MachineInstrBundleIterator.h.

◆ operator!= [2/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const const_instr_iterator &  R 
)
friend

Definition at line 224 of file MachineInstrBundleIterator.h.

◆ operator!= [3/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const const_instr_iterator &  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 228 of file MachineInstrBundleIterator.h.

◆ operator!= [4/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const nonconst_instr_iterator &  R 
)
friend

Definition at line 232 of file MachineInstrBundleIterator.h.

◆ operator!= [5/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const nonconst_instr_iterator &  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 236 of file MachineInstrBundleIterator.h.

◆ operator!= [6/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const_pointer  R 
)
friend

Definition at line 240 of file MachineInstrBundleIterator.h.

◆ operator!= [7/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const_pointer  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 243 of file MachineInstrBundleIterator.h.

◆ operator!= [8/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const_reference  R 
)
friend

Definition at line 246 of file MachineInstrBundleIterator.h.

◆ operator!= [9/9]

template<typename Ty, bool IsReverse = false>
bool operator!= ( const_reference  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 250 of file MachineInstrBundleIterator.h.

◆ operator== [1/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 185 of file MachineInstrBundleIterator.h.

◆ operator== [2/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const const_instr_iterator &  R 
)
friend

Definition at line 189 of file MachineInstrBundleIterator.h.

◆ operator== [3/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const const_instr_iterator &  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 193 of file MachineInstrBundleIterator.h.

◆ operator== [4/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const nonconst_instr_iterator &  R 
)
friend

Definition at line 197 of file MachineInstrBundleIterator.h.

◆ operator== [5/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const nonconst_instr_iterator &  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 201 of file MachineInstrBundleIterator.h.

◆ operator== [6/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const_pointer  R 
)
friend

Definition at line 205 of file MachineInstrBundleIterator.h.

◆ operator== [7/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const_pointer  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 208 of file MachineInstrBundleIterator.h.

◆ operator== [8/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const MachineInstrBundleIterator< Ty, IsReverse > &  L,
const_reference  R 
)
friend

Definition at line 211 of file MachineInstrBundleIterator.h.

◆ operator== [9/9]

template<typename Ty, bool IsReverse = false>
bool operator== ( const_reference  L,
const MachineInstrBundleIterator< Ty, IsReverse > &  R 
)
friend

Definition at line 215 of file MachineInstrBundleIterator.h.


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