MLIR  15.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::OpTrait::OneResult< ConcreteType > Class Template Reference

This class provides return value APIs for ops that are known to have a single result. More...

#include "mlir/IR/OpDefinition.h"

+ Inheritance diagram for mlir::OpTrait::OneResult< ConcreteType >:
+ Collaboration diagram for mlir::OpTrait::OneResult< ConcreteType >:

Public Member Functions

Value getResult ()
 
 operator Value ()
 If the operation returns a single value, then the Op can be implicitly converted to an Value. More...
 
void replaceAllUsesWith (Value 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...
 
void replaceAllUsesWith (Operation *op)
 Replace all uses of 'this' value with the result of 'op'. More...
 

Static Public Member Functions

static LogicalResult verifyTrait (Operation *op)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, OneResult >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 

Detailed Description

template<typename ConcreteType>
class mlir::OpTrait::OneResult< ConcreteType >

This class provides return value APIs for ops that are known to have a single result.

ResultType is the concrete type returned by getType().

Definition at line 598 of file OpDefinition.h.

Member Function Documentation

◆ getResult()

template<typename ConcreteType >
Value mlir::OpTrait::OneResult< ConcreteType >::getResult ( )
inline

Definition at line 600 of file OpDefinition.h.

◆ operator Value()

template<typename ConcreteType >
mlir::OpTrait::OneResult< ConcreteType >::operator Value ( )
inline

If the operation returns a single value, then the Op can be implicitly converted to an Value.

This yields the value of the only result.

Definition at line 604 of file OpDefinition.h.

◆ replaceAllUsesWith() [1/2]

template<typename ConcreteType >
void mlir::OpTrait::OneResult< ConcreteType >::replaceAllUsesWith ( Value  newValue)
inline

Replace all uses of 'this' value with the new value, updating anything in the IR that uses 'this' to use the other value instead.

When this returns there are zero uses of 'this'.

Definition at line 609 of file OpDefinition.h.

◆ replaceAllUsesWith() [2/2]

template<typename ConcreteType >
void mlir::OpTrait::OneResult< ConcreteType >::replaceAllUsesWith ( Operation op)
inline

Replace all uses of 'this' value with the result of 'op'.

Definition at line 614 of file OpDefinition.h.

◆ verifyTrait()

template<typename ConcreteType >
static LogicalResult mlir::OpTrait::OneResult< ConcreteType >::verifyTrait ( Operation op)
inlinestatic

Definition at line 618 of file OpDefinition.h.

References mlir::OpTrait::impl::verifyOneResult().


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