Skip to content

[OSLog][Test] Add test to check constant evaluability of functions in the new OSLog overlay #27228

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

Conversation

ravikandhadai
Copy link
Contributor

Update the new oslog overlay implementation to use @_semantics("constant_evaluable") annotation to denote constant evaluable functions.

Add a new test that uses the sil-opt pass ConstantEvaluableSubsetChecker.cpp
to check the constant evaluability of functions in the OSLog overlay.

@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test

Copy link
Collaborator

@theblixguy theblixguy left a comment

Choose a reason for hiding this comment

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

Just two tiny nits in diagnostic text.

NOTE(constexpr_unknown_function_called_here, none,
NOTE(constexpr_found_callee_with_no_body, none,
"encountered call to '%0' whose body is not available. "
"Imported functions must be marked @inlinable to constant evaluate.",
Copy link
Collaborator

@theblixguy theblixguy Sep 18, 2019

Choose a reason for hiding this comment

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

Nit: attributes should be surrounded with single quotes. Might be worth adding a fix-it as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @theblixguy

ERROR(not_constant_evaluable, none, "not constant evaluable", ())
ERROR(constexpr_imported_func_not_onone, none, "imported constant evaluable "
"function '%0' must be annotated @_optimize(none)", (StringRef))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here. Also, “annotated with”

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 59020e9450624613945c75dd454424fc9de286a3

@_semantics("constant_evaluable") annotation to denote constant
evaluable functions.

Add a test suite that uses the sil-opt pass ConstantEvaluableSubsetChecker.cpp
to check the constant evaluability of function in the OSLog
overlay.
@ravikandhadai ravikandhadai force-pushed the constexpr-oslog-constant-evaluable-check branch from 59020e9 to 61fd4b1 Compare September 18, 2019 17:45
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test and merge

1 similar comment
@ravikandhadai
Copy link
Contributor Author

@swift-ci Please test and merge

@swift-ci swift-ci merged commit 00ac8d8 into swiftlang:master Sep 18, 2019
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