Skip to content

TargetConstantFolding: address review comments #59687

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

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

eeckstein
Copy link
Contributor

This PR addresses review comments of #59665

  • move the source file to SILOptimizer/IRGenTransforms
  • add a file level comment
  • document and verify that the pass runs after serialization
  • catch overflows when truncating a constant value

@eeckstein eeckstein requested a review from atrick June 24, 2022 09:46
@eeckstein
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

No objections here.

For the record, I was reacting to the fact that IRGenOptions is now part of AST lowering, which tells anyone working on the compiler that any SIL pass is free to use target info.

* move the source file to SILOptimizer/IRGenTransforms
* add a file level comment
* document and verify that the pass runs after serialization
* catch overflows when truncating a constant value
@eeckstein eeckstein force-pushed the target-const-folding2 branch from 407dee9 to e6db6bb Compare June 27, 2022 07:04
@eeckstein
Copy link
Contributor Author

good point.
I've put the assert into SILModule::getIRGenOptionsOrNull. This prevents all optimizations to use IRGenOptions before serialization.

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@eeckstein eeckstein merged commit 66e6bed into swiftlang:main Jun 27, 2022
@eeckstein eeckstein deleted the target-const-folding2 branch June 27, 2022 09:56
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.

2 participants