LLVM 17.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::TypeSize Class Reference

#include "llvm/Support/TypeSize.h"

Inheritance diagram for llvm::TypeSize:
Inheritance graph
[legend]
Collaboration diagram for llvm::TypeSize:
Collaboration graph
[legend]

Public Member Functions

constexpr TypeSize (ScalarTy Quantity, bool Scalable)
 
constexpr ScalarTy getFixedSize () const
 
constexpr ScalarTy getKnownMinSize () const
 
 operator ScalarTy () const
 
- Public Member Functions inherited from llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >
constexpr bool operator== (const FixedOrScalableQuantity &RHS) const
 
constexpr bool operator!= (const FixedOrScalableQuantity &RHS) const
 
constexpr bool isZero () const
 
constexpr bool isNonZero () const
 
 operator bool () const
 
constexpr TypeSize getWithIncrement (ScalarTy RHS) const
 Add RHS to the underlying quantity.
 
constexpr ScalarTy getKnownMinValue () const
 Returns the minimum value this quantity can represent.
 
constexpr bool isScalable () const
 Returns whether the quantity is scaled by a runtime quantity (vscale).
 
constexpr bool isKnownEven () const
 A return value of true indicates we know at compile time that the number of elements (vscale * Min) is definitely even.
 
constexpr bool isKnownMultipleOf (ScalarTy RHS) const
 This function tells the caller whether the element count is known at compile time to be a multiple of the scalar value RHS.
 
constexpr ScalarTy getFixedValue () const
 
constexpr TypeSize divideCoefficientBy (ScalarTy RHS) const
 We do not provide the '/' operator here because division for polynomial types does not work in the same way as for normal integer types.
 
constexpr TypeSize multiplyCoefficientBy (ScalarTy RHS) const
 
constexpr TypeSize coefficientNextPowerOf2 () const
 
constexpr bool hasKnownScalarFactor (const FixedOrScalableQuantity &RHS) const
 Returns true if there exists a value X where RHS.multiplyCoefficientBy(X) will result in a value whose quantity matches our own.
 
constexpr ScalarTy getKnownScalarFactor (const FixedOrScalableQuantity &RHS) const
 Returns a value X where RHS.multiplyCoefficientBy(X) will result in a value whose quantity matches our own.
 
void print (raw_ostream &OS) const
 Printing function.
 

Static Public Member Functions

static constexpr TypeSize getFixed (ScalarTy ExactSize)
 
static constexpr TypeSize getScalable (ScalarTy MinimunSize)
 
static constexpr TypeSize get (ScalarTy Quantity, bool Scalable)
 
static constexpr TypeSize Fixed (ScalarTy ExactSize)
 
static constexpr TypeSize Scalable (ScalarTy MinimumSize)
 
- Static Public Member Functions inherited from llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >
static constexpr bool isKnownLT (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
 
static constexpr bool isKnownGT (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
 
static constexpr bool isKnownLE (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
 
static constexpr bool isKnownGE (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
 

Friends

constexpr TypeSize operator* (const TypeSize &LHS, const int RHS)
 
constexpr TypeSize operator* (const TypeSize &LHS, const unsigned RHS)
 
constexpr TypeSize operator* (const TypeSize &LHS, const int64_t RHS)
 
constexpr TypeSize operator* (const int LHS, const TypeSize &RHS)
 
constexpr TypeSize operator* (const unsigned LHS, const TypeSize &RHS)
 
constexpr TypeSize operator* (const int64_t LHS, const TypeSize &RHS)
 
constexpr TypeSize operator* (const uint64_t LHS, const TypeSize &RHS)
 

Additional Inherited Members

- Public Types inherited from llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >
using ScalarTy = uint64_t
 
- Protected Member Functions inherited from llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >
constexpr FixedOrScalableQuantity ()=default
 
constexpr FixedOrScalableQuantity (ScalarTy Quantity, bool Scalable)
 
- Protected Attributes inherited from llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >
ScalarTy Quantity
 
bool Scalable
 

Detailed Description

Definition at line 314 of file TypeSize.h.

Constructor & Destructor Documentation

◆ TypeSize()

constexpr llvm::TypeSize::TypeSize ( ScalarTy  Quantity,
bool  Scalable 
)
inlineconstexpr

Definition at line 319 of file TypeSize.h.

Member Function Documentation

◆ Fixed()

static constexpr TypeSize llvm::TypeSize::Fixed ( ScalarTy  ExactSize)
inlinestaticconstexpr

◆ get()

static constexpr TypeSize llvm::TypeSize::get ( ScalarTy  Quantity,
bool  Scalable 
)
inlinestaticconstexpr

◆ getFixed()

static constexpr TypeSize llvm::TypeSize::getFixed ( ScalarTy  ExactSize)
inlinestaticconstexpr

◆ getFixedSize()

constexpr ScalarTy llvm::TypeSize::getFixedSize ( ) const
inlineconstexpr

◆ getKnownMinSize()

constexpr ScalarTy llvm::TypeSize::getKnownMinSize ( ) const
inlineconstexpr

◆ getScalable()

static constexpr TypeSize llvm::TypeSize::getScalable ( ScalarTy  MinimunSize)
inlinestaticconstexpr

◆ operator ScalarTy()

TypeSize::operator TypeSize::ScalarTy ( ) const

◆ Scalable()

static constexpr TypeSize llvm::TypeSize::Scalable ( ScalarTy  MinimumSize)
inlinestaticconstexpr

Definition at line 334 of file TypeSize.h.

Friends And Related Function Documentation

◆ operator* [1/7]

constexpr TypeSize operator* ( const int  LHS,
const TypeSize RHS 
)
friend

Definition at line 381 of file TypeSize.h.

◆ operator* [2/7]

constexpr TypeSize operator* ( const int64_t  LHS,
const TypeSize RHS 
)
friend

Definition at line 387 of file TypeSize.h.

◆ operator* [3/7]

constexpr TypeSize operator* ( const TypeSize LHS,
const int  RHS 
)
friend

Definition at line 372 of file TypeSize.h.

◆ operator* [4/7]

constexpr TypeSize operator* ( const TypeSize LHS,
const int64_t  RHS 
)
friend

Definition at line 378 of file TypeSize.h.

◆ operator* [5/7]

constexpr TypeSize operator* ( const TypeSize LHS,
const unsigned  RHS 
)
friend

Definition at line 375 of file TypeSize.h.

◆ operator* [6/7]

constexpr TypeSize operator* ( const uint64_t  LHS,
const TypeSize RHS 
)
friend

Definition at line 390 of file TypeSize.h.

◆ operator* [7/7]

constexpr TypeSize operator* ( const unsigned  LHS,
const TypeSize RHS 
)
friend

Definition at line 384 of file TypeSize.h.


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