Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
Show First 20 Lines • Show All 466 Lines • ▼ Show 20 Lines | let description = [{ | ||||
pdl.replace %root with %otherOp | pdl.replace %root with %otherOp | ||||
``` | ``` | ||||
}]; | }]; | ||||
let arguments = (ins PDL_Operation:$operation, | let arguments = (ins PDL_Operation:$operation, | ||||
Optional<PDL_Operation>:$replOperation, | Optional<PDL_Operation>:$replOperation, | ||||
Variadic<PDL_InstOrRangeOf<PDL_Value>>:$replValues); | Variadic<PDL_InstOrRangeOf<PDL_Value>>:$replValues); | ||||
let assemblyFormat = [{ | let assemblyFormat = [{ | ||||
$operation `with` (`(` $replValues^ `:` type($replValues) `)`)? | $operation `with` (`(` $replValues^ `:` type($replValues) `)`)? | ||||
($replOperation^)? attr-dict | (`(` $replOperation^ `)`)? attr-dict | ||||
lattner: Does the parser correctly disambiguate whether it is parsing replValues or replOperation here? | |||||
MogballAuthorUnsubmitted Uh, it won't. Good catch. In reality, however, this operation will have either replValues or replOperation, so the format as it was is not ambiguous, but there's no way to communicate this to ODS. Mogball: Uh, it won't. Good catch.
In reality, however, this operation will have either `replValues` or… | |||||
lattnerUnsubmitted Not Done ReplyInline ActionsRight, I was wondering if ODS would catch the ambiguity. :-) lattner: Right, I was wondering if ODS would catch the ambiguity. :-) | |||||
}]; | }]; | ||||
let hasVerifier = 1; | let hasVerifier = 1; | ||||
} | } | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// pdl::ResultOp | // pdl::ResultOp | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
▲ Show 20 Lines • Show All 190 Lines • Show Last 20 Lines |
Does the parser correctly disambiguate whether it is parsing replValues or replOperation here? That requires it to look for a colon after .. with (%4 to decode which path it is in