10 #include "llvm/Support/Debug.h"
16 #define GET_OP_CLASSES
17 #include "mlir/Dialect/Transform/TuneExtension/TuneExtensionOps.cpp.inc"
19 #define DEBUG_TYPE "transform-tune"
20 #define DBGS() (llvm::dbgs() << "[" DEBUG_TYPE "] ")
26 void transform::tune::KnobOp::getEffects(
37 results.
setParams(llvm::cast<OpResult>(getResult()), *getSelected());
42 <<
"non-deterministic choice " << getName()
43 <<
" is only resolved through providing a `selected` attr";
47 if (
auto selected = getSelected()) {
48 if (
auto optionsArray = dyn_cast<ArrayAttr>(getOptions())) {
49 if (!llvm::is_contained(optionsArray, selected))
50 return emitOpError(
"provided `selected` attribute is not an element of "
51 "`options` array of attributes");
53 LLVM_DEBUG(
DBGS() <<
"cannot verify `selected` attribute " << selected
54 <<
" is an element of `options` attribute "
The result of a transform IR operation application.
static DiagnosedSilenceableFailure success()
Constructs a DiagnosedSilenceableFailure in the success state.
Include the generated interface declarations.
DiagnosedDefiniteFailure emitDefiniteFailure(Location loc, const Twine &message={})
Emits a definite failure with the given message.
LogicalResult verify(Operation *op, bool verifyRecursively=true)
Perform (potentially expensive) checks of invariants, used to detect compiler bugs,...