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

Conversation

@swernli
Copy link
Contributor

@swernli swernli commented May 3, 2021

This change updates the QirGeneration rewrite step to always mark the linkage type of functions internal except when they are the generated functions for an EntryPoint (the _Interop variant and the message based variant). This better allows for LLVM passes to perform optimization, inling, and dead code elimination across these functions. Note that in LLVM, any global variable or function definition is considered external by default when no linkage is provided.

@swernli swernli marked this pull request as draft May 3, 2021 04:16
@swernli
Copy link
Contributor Author

swernli commented May 3, 2021

This PR should be merged after #1004, as it contains the same change in it.

@swernli swernli changed the title swernli/qir-internal Mark all non-entrypoint functions in QIR as internal May 3, 2021
@swernli
Copy link
Contributor Author

swernli commented May 3, 2021

This change will not build e2e until calling conventions are updated on the Runtime repo. See microsoft/qsharp-runtime#667

@swernli
Copy link
Contributor Author

swernli commented May 4, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

This change updates the QirGeneration rewrite step to always mark the linkage type of functions internal except when they are the generated functions for an EntryPoint (the `_Interop` variant and the message based variant). This better allows for LLVM passes to perform optimization, inling, and dead code elimination across these functions. Note that in LLVM, any global variable or function definition is considered `external` by default when no linkage is provided.
@swernli swernli force-pushed the swernli/qir-internal branch from 3baddd8 to 3e5aca3 Compare May 4, 2021 17:18
@swernli swernli marked this pull request as ready for review May 4, 2021 17:18
@swernli swernli merged commit 8be0816 into main May 4, 2021
@swernli swernli deleted the swernli/qir-internal branch February 3, 2022 05:54
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