-
Notifications
You must be signed in to change notification settings - Fork 479
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
### Added | ||
|
||
- A compiler flag `simplifier-evaluate-builtins` that controls whether to run the simplifier pass that evaluates fully saturated builtins at compile time. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,10 +171,12 @@ pluginOptions = | |
, Implication (== True) posPreserveLogging True | ||
, Implication (== True) posCaseOfCaseConservative True | ||
, Implication (== True) posInlineConstants False | ||
, Implication (== True) posDoSimplifierEvaluateBuiltins False | ||
, Implication (== False) posRelaxedFloatin True | ||
, Implication (== False) posPreserveLogging False | ||
, Implication (== False) posCaseOfCaseConservative False | ||
, Implication (== False) posInlineConstants True | ||
, Implication (== False) posDoSimplifierEvaluateBuiltins True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My OCD would prefer |
||
] | ||
) | ||
, let k = "context-level" | ||
|
@@ -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. \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
\Implied by `no-conservative-optimisation`." | ||
in (k, PluginOption typeRep (setTrue k) posDoSimplifierEvaluateBuiltins desc []) | ||
, let k = "simplifier-inline" | ||
desc = "Run a simplification pass that performs inlining" | ||
in (k, PluginOption typeRep (setTrue k) posDoSimplifierInline desc []) | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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