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

Do we need the IR wrappers? #103

Open
kuzminrobin opened this issue Jun 7, 2021 · 0 comments
Open

Do we need the IR wrappers? #103

kuzminrobin opened this issue Jun 7, 2021 · 0 comments
Labels
Documentation Issues related to the specs or documentation maintained on this repository

Comments

@kuzminrobin
Copy link

Do we need the IR wrappers?

The known reason for the IR wrappers (in *.ll files) to exist is that the IR wrappers names start with the double underscore __.
The identifiers starting with double underscore are reserved in the standards of C and C++.
Are there any other reasons?
Can Q# compiler generate the QIR such that instead of the IR wrappers the corresponding wrapped functions are called?
(without __ in the beginning)

Stefan:
I would prefer finding a solution that does not require keeping the IR wrappers, whether that be switching the wrappers to a language that doesn't reserve __ as starting characters (like Rust) or updating the QIR spec to remove those. While they do provide some benefit for avoiding name collisions, that pattern has a cost overhead for implementation both for us and any external folks who want to implement their own runtime. Perhaps we could remove this question from here in favor of an issue filed against the spec in the language repo?

Bettina:
Yes, I am open to that conversation and filing it on the language repo makes sense

@kuzminrobin kuzminrobin added the Documentation Issues related to the specs or documentation maintained on this repository label Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues related to the specs or documentation maintained on this repository
Projects
None yet
Development

No branches or pull requests

1 participant