Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a compiler flag for the evaluateBuiltins pass #6450

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

zliu41
Copy link
Member

@zliu41 zliu41 commented Sep 6, 2024

This flag is currently missing, _posDoSimplifierEvaluateBuiltins is always true and cannot be turned off.

@zliu41 zliu41 requested review from effectfully and a team September 6, 2024 21:38
@@ -171,10 +171,12 @@ pluginOptions =
, Implication (== True) posPreserveLogging True
, Implication (== True) posCaseOfCaseConservative True
, Implication (== True) posInlineConstants False
, Implication (== True) posDoSimplifierEvaluateBuiltins False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets turned off here because it may increase program size?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it may change semantics: #6167

@zliu41 zliu41 enabled auto-merge (squash) September 6, 2024 22:09
@zliu41 zliu41 merged commit 9ca7a24 into master Sep 7, 2024
6 checks passed
@zliu41 zliu41 deleted the zliu41/evaluate-builtins branch September 7, 2024 00:12
Copy link
Contributor

@effectfully effectfully left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review.

, Implication (== False) posRelaxedFloatin True
, Implication (== False) posPreserveLogging False
, Implication (== False) posCaseOfCaseConservative False
, Implication (== False) posInlineConstants True
, Implication (== False) posDoSimplifierEvaluateBuiltins True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My OCD would prefer id over (== True) and not over (== False), but I guess it's currently more readable.

@@ -230,6 +232,11 @@ pluginOptions =
, let k = "simplifier-beta"
desc = "Run a simplification pass that performs beta transformations"
in (k, PluginOption typeRep (setTrue k) posDoSimplifierBeta desc [])
, let k = "simplifier-evaluate-builtins"
desc =
"Run a simplification pass that evaluates fully saturated builtin applications. \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some comments! To the pass itself and somewhere here, so that the user knows they are enabling a semantics-changing pass. At least the link to the issue.

kozross pushed a commit to mlabs-haskell/plutus that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants