LLVM 22.0.0git
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 30 of file Legality.h.

Member Typedef Documentation

◆ const_iterator

◆ IndicesVecT

Definition at line 32 of file Legality.h.

Constructor & Destructor Documentation

◆ ShuffleMask() [1/3]

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

Definition at line 38 of file Legality.h.

References llvm::move().

Referenced by getIdentity(), operator!=(), operator<<, and operator==().

◆ ShuffleMask() [2/3]

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

Definition at line 39 of file Legality.h.

◆ ShuffleMask() [3/3]

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

Definition at line 40 of file Legality.h.

Member Function Documentation

◆ begin()

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

Definition at line 66 of file Legality.h.

◆ dump()

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

Definition at line 21 of file Legality.cpp.

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

◆ end()

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

Definition at line 67 of file Legality.h.

◆ getIdentity()

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 44 of file Legality.h.

References llvm::append_range(), llvm::seq(), and ShuffleMask().

◆ 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 52 of file Legality.h.

References llvm::enumerate().

◆ operator ArrayRef< int >()

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

Definition at line 41 of file Legality.h.

◆ operator!=()

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

Definition at line 62 of file Legality.h.

References llvm::Other, and ShuffleMask().

◆ operator==()

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

Definition at line 59 of file Legality.h.

References llvm::Other, and ShuffleMask().

◆ operator[]()

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

Definition at line 64 of file Legality.h.

◆ print()

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

Definition at line 73 of file Legality.h.

References llvm::interleave().

Referenced by dump().

◆ size()

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

Definition at line 63 of file Legality.h.

◆ operator<<

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

Definition at line 69 of file Legality.h.

References ShuffleMask().


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