9 #ifndef MLIR_ANALYSIS_SLICEANALYSIS_H_
10 #define MLIR_ANALYSIS_SLICEANALYSIS_H_
16 #include "llvm/ADT/SetVector.h"
144 SetVector<Operation *> *backwardSlice,
145 const BackwardSliceOptions &
options = {});
150 SetVector<Operation *> *backwardSlice,
151 const BackwardSliceOptions &
options = {});
230 SetVector<Operation *>
231 getSlice(Operation *op,
const BackwardSliceOptions &backwardSliceOptions = {},
263 SmallVectorImpl<Operation *> &combinerOps);
static llvm::ManagedStatic< PassManagerOptions > options
Operation is the basic unit of execution within MLIR.
Include the generated interface declarations.
LogicalResult getBackwardSlice(Operation *op, SetVector< Operation * > *backwardSlice, const BackwardSliceOptions &options={})
Fills backwardSlice with the computed backward slice (i.e.
SliceOptions::TransitiveFilter TransitiveFilter
SliceOptions ForwardSliceOptions
Value matchReduction(ArrayRef< BlockArgument > iterCarriedArgs, unsigned redPos, SmallVectorImpl< Operation * > &combinerOps)
Utility to match a generic reduction given a list of iteration-carried arguments, iterCarriedArgs and...
SetVector< Operation * > getSlice(Operation *op, const BackwardSliceOptions &backwardSliceOptions={}, const ForwardSliceOptions &forwardSliceOptions={})
Iteratively computes backward slices and forward slices until a fixed point is reached.
void getForwardSlice(Operation *op, SetVector< Operation * > *forwardSlice, const ForwardSliceOptions &options={})
Fills forwardSlice with the computed forward slice (i.e.
bool omitUsesFromAbove
When omitUsesFromAbove is true, the backward slice computation omits traversing values that are captu...
bool omitBlockArguments
When omitBlockArguments is true, the backward slice computation omits traversing any block arguments.
std::function< bool(Operation *)> TransitiveFilter
Type of the condition to limit the propagation of transitive use-defs.
bool inclusive
Include the top level op in the slice.
SliceOptions(TransitiveFilter filter)