MLIR
20.0.0git
|
Class encompassing various options related to cloning an operation. More...
#include "mlir/IR/Operation.h"
Public Member Functions | |
CloneOptions () | |
Default constructs an option with all flags set to false. More... | |
CloneOptions (bool cloneRegions, bool cloneOperands) | |
Constructs an instance with the clone regions and clone operands flags set accordingly. More... | |
CloneOptions & | cloneRegions (bool enable=true) |
Configures whether cloning should traverse into any of the regions of the operation. More... | |
bool | shouldCloneRegions () const |
Returns whether regions of the operation should be cloned as well. More... | |
CloneOptions & | cloneOperands (bool enable=true) |
Configures whether operation' operands should be cloned. More... | |
bool | shouldCloneOperands () const |
Returns whether operands should be cloned as well. More... | |
Static Public Member Functions | |
static CloneOptions | all () |
Returns an instance with all flags set to true. More... | |
Class encompassing various options related to cloning an operation.
Users of this class should pass it to Operation's 'clone' methods. Current options include:
Definition at line 143 of file Operation.h.
Operation::CloneOptions::CloneOptions | ( | ) |
Default constructs an option with all flags set to false.
That means all parts of an operation that may optionally not be cloned, are not cloned.
Definition at line 679 of file Operation.cpp.
Operation::CloneOptions::CloneOptions | ( | bool | cloneRegions, |
bool | cloneOperands | ||
) |
Constructs an instance with the clone regions and clone operands flags set accordingly.
Definition at line 682 of file Operation.cpp.
|
static |
Returns an instance with all flags set to true.
This is the default when using the clone method and clones all parts of the operation.
Definition at line 685 of file Operation.cpp.
References cloneOperands(), and cloneRegions().
Referenced by mlir::Region::cloneInto(), and mlir::Operation::cloneWithoutRegions().
Operation::CloneOptions & Operation::CloneOptions::cloneOperands | ( | bool | enable = true | ) |
Configures whether operation' operands should be cloned.
Otherwise the resulting clones will simply have zero operands.
Definition at line 694 of file Operation.cpp.
Referenced by all(), and mlir::Region::cloneInto().
Operation::CloneOptions & Operation::CloneOptions::cloneRegions | ( | bool | enable = true | ) |
Configures whether cloning should traverse into any of the regions of the operation.
If set to true, the operation's regions are recursively cloned. If set to false, cloned operations will have the same number of regions, but they will be empty. Cloning of nested operations in the operation's regions are currently unaffected by other flags.
Definition at line 689 of file Operation.cpp.
Referenced by all(), and mlir::Region::cloneInto().
|
inline |
Returns whether operands should be cloned as well.
Definition at line 173 of file Operation.h.
|
inline |
Returns whether regions of the operation should be cloned as well.
Definition at line 166 of file Operation.h.