LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::sandboxir::ShuffleMask Class Reference

#include "llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h"

Public Types

using IndicesVecT = SmallVector< int, 8 >
 
using const_iterator = IndicesVecT::const_iterator
 

Public Member Functions

 ShuffleMask (SmallVectorImpl< int > &&Indices)
 
 ShuffleMask (std::initializer_list< int > Indices)
 
 ShuffleMask (ArrayRef< int > Indices)
 
 operator ArrayRef< int > () const
 
bool isIdentity () const
 \Returns true if the mask is a perfect identity mask with consecutive indices, i.e., performs no lane shuffling, like 0,1,2,3...
 
bool operator== (const ShuffleMask &Other) const
 
bool operator!= (const ShuffleMask &Other) const
 
size_t size () const
 
int operator[] (int Idx) const
 
const_iterator begin () const
 
const_iterator end () const
 
void print (raw_ostream &OS) const
 
LLVM_DUMP_METHOD void dump () const
 

Static Public Member Functions

static ShuffleMask getIdentity (unsigned Sz)
 Creates and returns an identity shuffle mask of size Sz.
 

Friends

raw_ostreamoperator<< (raw_ostream &OS, const ShuffleMask &Mask)
 

Detailed Description

Definition at line 28 of file Legality.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 64 of file Legality.h.

◆ IndicesVecT

Definition at line 30 of file Legality.h.

Constructor & Destructor Documentation

◆ ShuffleMask() [1/3]

llvm::sandboxir::ShuffleMask::ShuffleMask ( SmallVectorImpl< int > &&  Indices)
inline

Definition at line 36 of file Legality.h.

◆ ShuffleMask() [2/3]

llvm::sandboxir::ShuffleMask::ShuffleMask ( std::initializer_list< int >  Indices)
inline

Definition at line 37 of file Legality.h.

◆ ShuffleMask() [3/3]

llvm::sandboxir::ShuffleMask::ShuffleMask ( ArrayRef< int >  Indices)
inlineexplicit

Definition at line 38 of file Legality.h.

Member Function Documentation

◆ begin()

const_iterator llvm::sandboxir::ShuffleMask::begin ( ) const
inline

◆ dump()

void llvm::sandboxir::ShuffleMask::dump ( ) const

Definition at line 23 of file Legality.cpp.

References llvm::dbgs(), and print().

◆ end()

const_iterator llvm::sandboxir::ShuffleMask::end ( ) const
inline

Definition at line 66 of file Legality.h.

References llvm::SmallVectorTemplateCommon< T, typename >::end().

◆ getIdentity()

static ShuffleMask llvm::sandboxir::ShuffleMask::getIdentity ( unsigned  Sz)
inlinestatic

Creates and returns an identity shuffle mask of size Sz.

For example if Sz == 4 the returned mask is {0, 1, 2, 3}.

Definition at line 42 of file Legality.h.

References Idx, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorImpl< T >::reserve().

◆ isIdentity()

bool llvm::sandboxir::ShuffleMask::isIdentity ( ) const
inline

\Returns true if the mask is a perfect identity mask with consecutive indices, i.e., performs no lane shuffling, like 0,1,2,3...

Definition at line 51 of file Legality.h.

References llvm::enumerate(), and Idx.

◆ operator ArrayRef< int >()

llvm::sandboxir::ShuffleMask::operator ArrayRef< int > ( ) const
inline

Definition at line 39 of file Legality.h.

◆ operator!=()

bool llvm::sandboxir::ShuffleMask::operator!= ( const ShuffleMask Other) const
inline

Definition at line 61 of file Legality.h.

References llvm::Other.

◆ operator==()

bool llvm::sandboxir::ShuffleMask::operator== ( const ShuffleMask Other) const
inline

Definition at line 58 of file Legality.h.

References llvm::Other.

◆ operator[]()

int llvm::sandboxir::ShuffleMask::operator[] ( int  Idx) const
inline

Definition at line 63 of file Legality.h.

References Idx.

◆ print()

void llvm::sandboxir::ShuffleMask::print ( raw_ostream OS) const
inline

Definition at line 72 of file Legality.h.

References llvm::interleave(), and OS.

Referenced by dump().

◆ size()

size_t llvm::sandboxir::ShuffleMask::size ( ) const
inline

Definition at line 62 of file Legality.h.

References llvm::SmallVectorBase< Size_T >::size().

Friends And Related Function Documentation

◆ operator<<

raw_ostream & operator<< ( raw_ostream OS,
const ShuffleMask Mask 
)
friend

Definition at line 68 of file Legality.h.


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