My Project
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
mlir::IntegerType Class Reference

Integer types can have arbitrary bitwidth up to a large fixed limit. More...

#include <StandardTypes.h>

Inheritance diagram for mlir::IntegerType:
Inheritance graph
[legend]
Collaboration diagram for mlir::IntegerType:
Collaboration graph
[legend]

Public Member Functions

unsigned getWidth () const
 Return the bitwidth of this integer type. More...
 

Static Public Member Functions

static IntegerType get (unsigned width, MLIRContext *context)
 
static IntegerType getChecked (unsigned width, MLIRContext *context, Location location)
 
static LogicalResult verifyConstructionInvariants (Optional< Location > loc, MLIRContext *context, unsigned width)
 Verify the construction of an integer type. More...
 
static bool kindof (unsigned kind)
 Methods for support type inquiry through isa, cast, and dyn_cast. More...
 
- Static Public Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
static ClassIDgetClassID ()
 Return a unique identifier for the concrete type. More...
 
template<typename T >
static bool classof (T val)
 

Static Public Attributes

static constexpr unsigned kMaxWidth = 4096
 Integer representation maximal bitwidth. More...
 

Additional Inherited Members

- Public Types inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
using Base = StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
 Utility declarations for the concrete attribute class. More...
 
using ImplType = StorageT
 
- Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
ImplTypegetImpl () const
 Utility for easy access to the storage instance. More...
 
- Static Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
template<typename... Args>
static ConcreteT get (MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static ConcreteT getChecked (const Location &loc, MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static LogicalResult verifyConstructionInvariants (Args... args)
 Default implementation that just returns success. More...
 

Detailed Description

Integer types can have arbitrary bitwidth up to a large fixed limit.

Member Function Documentation

◆ get()

IntegerType IntegerType::get ( unsigned  width,
MLIRContext context 
)
static

Get or create a new IntegerType of the given width within the context. Assume the width is within the allowed range and assert on failures. Use getChecked to handle failures gracefully.

◆ getChecked()

IntegerType IntegerType::getChecked ( unsigned  width,
MLIRContext context,
Location  location 
)
static

Get or create a new IntegerType of the given width within the context, defined at the given, potentially unknown, location. If the width is outside the allowed range, emit errors and return a null type.

◆ getWidth()

unsigned IntegerType::getWidth ( ) const

Return the bitwidth of this integer type.

◆ kindof()

static bool mlir::IntegerType::kindof ( unsigned  kind)
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast.

◆ verifyConstructionInvariants()

LogicalResult IntegerType::verifyConstructionInvariants ( Optional< Location loc,
MLIRContext context,
unsigned  width 
)
static

Verify the construction of an integer type.

Member Data Documentation

◆ kMaxWidth

constexpr unsigned IntegerType::kMaxWidth = 4096
static

Integer representation maximal bitwidth.


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