17 #define GET_OP_CLASSES
18 #include "mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.cpp.inc"
24 if (isa<TransformHandleTypeInterface>(getAt().getType())) {
25 auto payload = state.getPayloadOps(getAt());
31 assert(isa<transform::TransformValueHandleTypeInterface>(getAt().getType()) &&
32 "unhandled kind of transform type");
35 os <<
"value handle points to ";
36 if (
auto arg = llvm::dyn_cast<BlockArgument>(value)) {
37 os <<
"a block argument #" << arg.getArgNumber() <<
" in block #"
38 << std::distance(arg.getOwner()->getParent()->begin(),
39 arg.getOwner()->getIterator())
40 <<
" in region #" << arg.getOwner()->getParent()->getRegionNumber();
42 os <<
"an op result #" << llvm::cast<OpResult>(value).getResultNumber();
46 for (
Value value : state.getPayloadValues(getAt())) {
48 describeValue(
diag.attachNote(), value);
58 llvm::raw_string_ostream os(str);
60 os << *getMessage() <<
" ";
61 llvm::interleaveComma(state.getParams(getParam()), os);
66 for (
Operation *payload : state.getPayloadOps(getAnchor()))
static std::string diag(const llvm::Value &value)
The result of a transform IR operation application.
static DiagnosedSilenceableFailure success()
Constructs a DiagnosedSilenceableFailure in the success state.
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.
Operation is the basic unit of execution within MLIR.
InFlightDiagnostic emitRemark(const Twine &message={})
Emit a remark about this operation, reporting up to any diagnostic handlers that may be listening.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Include the generated interface declarations.
InFlightDiagnostic emitRemark(Location loc)
Utility method to emit a remark message using this location.