MLIR  15.0.0git
mlir::detail::ValueImpl Class Reference

The base class for all derived Value classes. More...

#include "mlir/IR/Value.h"

Inheritance diagram for mlir::detail::ValueImpl:
Collaboration diagram for mlir::detail::ValueImpl:

## Public Types

enum  Kind { Kind::InlineOpResult = 0, Kind::OutOfLineOpResult = 6, Kind::BlockArgument = 7 }
The enumeration represents the various different kinds of values the internal representation may take. More...

Public Types inherited from mlir::IRObjectWithUseList< OpOperand >
using use_iterator = ValueUseIterator< OpOperand >

using use_range = iterator_range< use_iterator >

using user_iterator = ValueUserIterator< use_iterator, OpOperand >

using user_range = iterator_range< user_iterator >

## Public Member Functions

Type getType () const
Return the type of this value. More...

void setType (Type type)
Set the type of this value. More...

Kind getKind () const
Return the kind of this value. More...

Public Member Functions inherited from mlir::IRObjectWithUseList< OpOperand >
~IRObjectWithUseList ()

void dropAllUses ()
Drop all uses of this object from their respective owners. More...

void replaceAllUsesWith (ValueT &&newValue)
Replace all uses of 'this' value with the new value, updating anything in the IR that uses 'this' to use the other value instead. More...

use_iterator use_begin () const

use_iterator use_end () const

use_range getUses () const
Returns a range of all uses, which is useful for iterating over all uses. More...

bool hasOneUse () const
Returns true if this value has exactly one use. More...

bool use_empty () const
Returns true if this value has no uses. More...

user_iterator user_begin () const

user_iterator user_end () const

user_range getUsers () const
Returns a range of all users. More...

## Protected Member Functions

ValueImpl (Type type, Kind kind)

Protected Member Functions inherited from mlir::IRObjectWithUseList< OpOperand >
IRObjectWithUseList ()=default

OpOperandgetFirstUse () const
Return the first operand that is using this value, for use by custom use/def iterators. More...

## Protected Attributes

llvm::PointerIntPair< Type, 3, KindtypeAndKind
The type of this result and the kind. More...

## Detailed Description

The base class for all derived Value classes.

It contains all of the components that are shared across Value classes.

Definition at line 40 of file Value.h.

## ◆ Kind

 strong

The enumeration represents the various different kinds of values the internal representation may take.

We use all of the bits from Type that we can to store indices inline.

Enumerator
InlineOpResult

The first N kinds are all inline operation results.

An inline operation result means that the kind represents the result number. This removes the need to store an additional index value. The derived class here is an OpResultImpl.

OutOfLineOpResult

The next kind represents a 'out-of-line' operation result.

This is for results with numbers larger than we can represent inline. The derived class here is an OpResultImpl.

BlockArgument

The last kind represents a block argument.

The derived class here is an BlockArgumentImpl.

Definition at line 45 of file Value.h.

## ◆ ValueImpl()

 mlir::detail::ValueImpl::ValueImpl ( Type type, Kind kind )
inlineprotected

Definition at line 72 of file Value.h.

Referenced by mlir::detail::BlockArgumentImpl::classof().

## ◆ getKind()

 Kind mlir::detail::ValueImpl::getKind ( ) const
inline

Return the kind of this value.

Definition at line 69 of file Value.h.

References typeAndKind.

## ◆ getType()

 Type mlir::detail::ValueImpl::getType ( ) const
inline

Return the type of this value.

Definition at line 63 of file Value.h.

References typeAndKind.

Referenced by mlir::Value::getContext().

## ◆ setType()

 void mlir::detail::ValueImpl::setType ( Type type )
inline

Set the type of this value.

Definition at line 66 of file Value.h.

References typeAndKind.

## ◆ typeAndKind

 llvm::PointerIntPair mlir::detail::ValueImpl::typeAndKind
protected

The type of this result and the kind.

Definition at line 75 of file Value.h.

Referenced by getKind(), getType(), and setType().

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