Repository navigation
fix(mlir): abort on unhandled effect op as C does (migrates #1558 onto main per #1576) - #1680
Merged
Merged
Conversation
MLIR effect dispatch now calls __flow_unhandled_effect("E.op") when no
handler has the operation, matching the C backend's behavior unless
FLOW_PERMISSIVE_EFFECTS=1 is set.
Changes:
- mlirgen.flow: Added __flow_unhandled_effect helper and HP_EFFECT flag
- mlirgen.flow: Effect dispatch emits unhandled calls before zero defaults
- effects.flow: Updated fixture to test unhandled abort behavior
- effects.mlir, effects.out: Updated fixture goldens
- mlir_commands expecteds: Updated for new effect dispatch
- corpus.txt: Hand-updated 77 digests for affected programs
All affected files are effect-related programs where the new unhandled
dispatch changes the MLIR structure. Parity gate passes.
Migrated from historical PR #1558 (commits 76b5e0f, 472851f).
Part of #1576.
Co-authored-by: Abhishek Shivakumar <[email protected]>
Co-authored-by: Abhishek Shivakumar <[email protected]>
…s-pr1558-5d3c Co-authored-by: Abhishek Shivakumar <[email protected]> # Conflicts: # compiler/bootstrap/flowc_stage_a # compiler/bootstrap/flowc_stage_a.c
Co-authored-by: Abhishek Shivakumar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates historical PR #1558 (effects work) onto current main as a new implementation.
Changes
MLIR effect dispatch now calls
__flow_unhandled_effect("E.op")when no handler has the operation, matching the C backend's behavior (strict effects by default, unlessFLOW_PERMISSIVE_EFFECTS=1is set).Implementation
mlg_put_unhandled_effecthelper andHP_EFFECTflagTesting
All 77 affected files are effect-related programs where the new unhandled dispatch changes the MLIR structure but preserves semantics.
Origin
Supersedes #1558.
Part of #1576.