Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@swernli
Copy link
Collaborator

@swernli swernli commented May 3, 2021

This change updates the calling conventions used in the QIR Runtime tests to use __Interop wrappers for calling functions. This also required updating some older tests to the multiple entry point strategy for testing so that each test function is considered an externally callable operation/function. In addition, this updates the CMakeLists.txt to consume the bitcode files instead of the human readable .ll files wherever possible.

This change updates the calling conventions used in the QIR Runtime tests to use `__Interop` wrappers for calling functions. This also required updating some older tests to the multiple entry point strategy for testing so that each test function is considered an externally callable operation/function. In addition, this updates the CMakeLists.txt to consume the bitcode files instead of the human readable .ll files wherever possible.
@swernli swernli enabled auto-merge (squash) May 4, 2021 00:01
@kuzminrobin
Copy link
Contributor

(nit) This is the first time I hear about renaming to __Interop. Would be nice to see a link to a task that discusses or provides more details about that renaming.

@swernli
Copy link
Collaborator Author

swernli commented May 4, 2021

@kuzminrobin This wasn't a rename so much as a switch in pattern where the expectation is that callers should use the interop functions we generate instead of trying to rely on QIR specific types. The __Interop wrappers were introduced as part of the initial QIR generation work (see microsoft/qsharp-compiler#889) but we didn't enforce their usage because we were lacking multiple entry point support. Now that this is done, we can call into these instead and move forward with marking all non-entrypoint functions as internal.

TestApplyIf();
TestApplyIfWithFunctors();
TestApplyConditionally();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice change! Thanks!

@swernli swernli merged commit d2df13d into main May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants