-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SV: Further annotations to optimize mappings
This introduces 3 annotations that work together to help the Jib compilation process optimize mappings - Whenever we elaborate a mapping 'X' we always generate a X_backwards (or forwards) call under a X_backwards_matches guard. The rewrite notes this fact by placing a $[mapping_guarded] attribute on the call to X_backwards - The last clause of a generated mapping is annotated with a $[mapping_last] attribute. This required extending the AST (and ANF) with attribute support here. - Generated mappings themselves are annotation with a $[mapping_function] attribute. For each mapping_function (X_backwards or similar) we generated a X_backwards_infallible function, which generates a match statement that returns a dummy value rather than match_failure when any $[mapping_last] clause is not matched. Any call to X_backwards is changed to X_backwards_infallible when it has a $[mapping_guarded] attribute. SMT: Always optimize pure matches (Note that match_failure is a side-effect)
- Loading branch information
Showing
15 changed files
with
361 additions
and
182 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.