LLVM 24.0.0git
llvm::sandboxir::BndlRef< T > Class Template Reference

An ArrayRef of Values or Instructions that we can print/dump for debugging. More...

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

Inheritance diagram for llvm::sandboxir::BndlRef< T >:
[legend]

Public Member Functions

void print (raw_ostream &OS) const
 Helper dump function for debugging.
LLVM_DUMP_METHOD void dump () const
Public Member Functions inherited from llvm::ArrayRef< T >
 ArrayRef ()=default
 Construct an empty ArrayRef.
 ArrayRef (const T &OneElt LLVM_LIFETIME_BOUND)
 Construct an ArrayRef from a single element.
constexpr ArrayRef (const T *data LLVM_LIFETIME_BOUND, size_t length)
 Construct an ArrayRef from a pointer and length.
constexpr ArrayRef (const T *begin LLVM_LIFETIME_BOUND, const T *end)
 Construct an ArrayRef from a range.
template<typename C, typename = std::enable_if_t< std::conjunction_v< std::is_convertible<decltype(std::declval<const C &>().data()) *, const T *const *>, std::is_integral<decltype(std::declval<const C &>().size())>>
constexpr ArrayRef (const C &V)
 Construct an ArrayRef from a type that has a data() method that returns a pointer convertible to const T *.
template<size_t N>
constexpr ArrayRef (const T(&Arr LLVM_LIFETIME_BOUND)[N])
 Construct an ArrayRef from a C array.
constexpr ArrayRef (std::initializer_list< T > Vec LLVM_LIFETIME_BOUND)
 Construct an ArrayRef from a std::initializer_list.
template<typename U, typename = std::enable_if_t<std::is_convertible_v< U *const *, std::add_const_t<T> *const *>>>
 ArrayRef (const iterator_range< U * > &Range)
 Construct an ArrayRef<T> from iterator_range<U*>.
iterator begin () const
iterator end () const
reverse_iterator rbegin () const
reverse_iterator rend () const
bool empty () const
 Check if the array is empty.
const Tdata () const
size_t size () const
 Get the array size.
const Tfront () const
 Get the first element.
const Tback () const
 Get the last element.
const Tconsume_front ()
 consume_front() - Returns the first element and drops it from ArrayRef.
const Tconsume_back ()
 consume_back() - Returns the last element and drops it from ArrayRef.
template<typename Allocator>
MutableArrayRef< Tcopy (Allocator &A)
bool equals (ArrayRef RHS) const
 Check for element-wise equality.
ArrayRef< Tslice (size_t N, size_t M) const
 slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array.
ArrayRef< Tslice (size_t N) const
 slice(n) - Chop off the first N elements of the array.
ArrayRef< Tdrop_front (size_t N=1) const
 Drop the first N elements of the array.
ArrayRef< Tdrop_back (size_t N=1) const
 Drop the last N elements of the array.
template<class PredicateT>
ArrayRef< Tdrop_while (PredicateT Pred) const
 Return a copy of *this with the first N elements satisfying the given predicate removed.
template<class PredicateT>
ArrayRef< Tdrop_until (PredicateT Pred) const
 Return a copy of *this with the first N elements not satisfying the given predicate removed.
ArrayRef< Ttake_front (size_t N=1) const
 Return a copy of *this with only the first N elements.
ArrayRef< Ttake_back (size_t N=1) const
 Return a copy of *this with only the last N elements.
template<class PredicateT>
ArrayRef< Ttake_while (PredicateT Pred) const
 Return the first N elements of this Array that satisfy the given predicate.
template<class PredicateT>
ArrayRef< Ttake_until (PredicateT Pred) const
 Return the first N elements of this Array that don't satisfy the given predicate.
const Toperator[] (size_t Index) const
template<typename U>
std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & operator= (U &&Temporary)=delete
 Disallow accidental assignment from a temporary.
template<typename U>
std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & operator= (std::initializer_list< U >)=delete
 Disallow accidental assignment from a temporary.
std::vector< Tvec () const
 operator std::vector< T > () const

Additional Inherited Members

Public Types inherited from llvm::ArrayRef< T >
using value_type = T
using pointer = value_type *
using const_pointer = const value_type *
using reference = value_type &
using const_reference = const value_type &
using iterator = const_pointer
using const_iterator = const_pointer
using reverse_iterator = std::reverse_iterator<iterator>
using const_reverse_iterator = std::reverse_iterator<const_iterator>
using size_type = size_t
using difference_type = ptrdiff_t

Detailed Description

template<typename T>
class llvm::sandboxir::BndlRef< T >

An ArrayRef of Values or Instructions that we can print/dump for debugging.

It is mainly used for the vectorizer's instr/value bundles.

Definition at line 458 of file VecUtils.h.

Member Function Documentation

◆ dump()

template<typename T>
void llvm::sandboxir::BndlRef< T >::dump ( ) const

Definition at line 163 of file VecUtils.cpp.

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

◆ print()

template<typename T>
void llvm::sandboxir::BndlRef< T >::print ( raw_ostream & OS) const
inline

Helper dump function for debugging.

Definition at line 465 of file VecUtils.h.

References llvm::enumerate().


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