When using --mlir-debug-counter=pass-execution-skip=N, the MLIR debug counter can skip the internal PDL-to-PDLInterp lowering pass that runs inside FrozenRewritePatternSet's constructor. This caused an assertion failure in PDLByteCode::Generator::generate() because the PDL module wasn't properly converted to the interpreter dialect. The fix adds a check after the PDL lowering pipeline runs to verify that the expected matcher function symbol was produced. If the symbol is absent (e.g., because the lowering was skipped by a debug counter), bytecode generation is skipped entirely and PDL patterns are not applied. This allows debug counter bisection to work without crashing. Fixes #131441 Fixes #128342 Assisted-by: Claude Code
5.9 KiB
5.9 KiB