MLIR  20.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 >:

Public Member Functions

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 665 of file OpDefinition.h.

Member Function Documentation

◆ replaceAllUsesWith() [1/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 675 of file OpDefinition.h.

References mlir::OpTrait::TraitBase< ConcreteType, OneResult >::getOperation(), and mlir::Operation::replaceAllUsesWith().

◆ replaceAllUsesWith() [2/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 670 of file OpDefinition.h.

References mlir::OpTrait::TraitBase< ConcreteType, OneResult >::getOperation(), mlir::Operation::getResult(), and mlir::Value::replaceAllUsesWith().

◆ verifyTrait()

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

Definition at line 679 of file OpDefinition.h.

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


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