9 #ifndef MLIR_ANALYSIS_SLICEWALK_H
10 #define MLIR_ANALYSIS_SLICEWALK_H
32 : action(action), nextValues(nextValues) {}
This class contains all of the information necessary to report a diagnostic to the DiagnosticEngine.
This class represents a diagnostic that is inflight and set to be reported.
This class provides an abstraction over the different types of ranges over Values.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
A class to signal how to proceed with the walk of the backward slice:
@ Interrupt
Stops the walk.
@ Skip
Continues the walk, but skips the predecessors of the current value.
@ AdvanceTo
Continues the walk to user-specified values.
bool wasInterrupted() const
Returns true if the walk was interrupted.
WalkContinuation(WalkAction action, mlir::ValueRange nextValues)
bool wasAdvancedTo() const
Returns true if the walk was advanced to user-specified values.
static WalkContinuation skip()
Creates a continuation that advances the walk without adding any predecessor values to the work list.
static WalkContinuation advanceTo(mlir::ValueRange nextValues)
Creates a continuation that adds the user-specified nextValues to the work list and advances the walk...
mlir::ArrayRef< mlir::Value > getNextValues() const
Returns the next values to continue the walk with.
static WalkContinuation interrupt()
Creates a continuation that interrupts the walk.
WalkContinuation(mlir::Diagnostic &&)
Allows diagnostics to interrupt the walk.
WalkContinuation(mlir::InFlightDiagnostic &&)
Allows diagnostics to interrupt the walk.
bool wasSkipped() const
Returns true if the walk was skipped.
Include the generated interface declarations.
std::optional< SmallVector< Value > > getControlFlowPredecessors(Value value)
Computes a vector of all control predecessors of value.
WalkContinuation walkSlice(mlir::ValueRange rootValues, WalkCallback walkCallback)
Walks the slice starting from the rootValues using a depth-first traversal.