|
MLIR 24.0.0git
|
A cache for repeated deadness queries on nested operations. More...
#include "mlir/Interfaces/SideEffectInterfaces.h"
Public Types | |
| enum class | State : uint8_t { Alive , Dead } |
Public Member Functions | |
| bool | isOpTriviallyDead (Operation *op) |
| Return true if the operation is unused and can be erased. | |
| void | invalidate (Operation *op) |
| Invalidate the operation, its descendants, and its ancestors. | |
| void | invalidateAncestors (Operation *op) |
| Invalidate the operation and its ancestors, preserving descendant entries. | |
A cache for repeated deadness queries on nested operations.
All changes to an operation or its nested IR must invalidate that operation. Moves must also invalidate the old parent. Invalidate operations before erasing them.
Definition at line 554 of file SideEffectInterfaces.h.
|
strong |
| Enumerator | |
|---|---|
| Alive | |
| Dead | |
Definition at line 556 of file SideEffectInterfaces.h.
Invalidate the operation, its descendants, and its ancestors.
Definition at line 159 of file SideEffectInterfaces.cpp.
References invalidateAncestors(), and mlir::Operation::walk().
Invalidate the operation and its ancestors, preserving descendant entries.
Definition at line 164 of file SideEffectInterfaces.cpp.
References mlir::Operation::getParentOp().
Referenced by invalidate().
Return true if the operation is unused and can be erased.
Terminators and symbols cannot be erased. Uses are checked on every query.
Definition at line 144 of file SideEffectInterfaces.cpp.
References Dead, mlir::Operation::mightHaveTrait(), mlir::Operation::use_empty(), and wouldOpBeTriviallyDeadImpl().