-
Notifications
You must be signed in to change notification settings - Fork 225
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
Strip IncRC
instructions from SSA for ACIR functions before reaching ACIRgen
#6831
Comments
If I am reading it correctly, To be clear, you're worried about the fact that they are there taking up extra slots in the instruction vectors; the compiler will force us to consider them anyway as long as they are part of I wonder if there would be a different way of handling this issue via #6841, some kind of separation of the instruction set itself, with some phantom types indicating what kind of runtime we're passing over, so that no pass can create such instructions, and then we can be sure that we really don't need to consider them because they cannot exist 🤔 |
Yes, if unconstrained functions are separated before SSA we could have a simple SSA check to see if the function is constrained, and if so avoid inserting any rc instructions to begin with. |
In ACIR functions we currently allow
IncrementRC
instructions to sit in the SSA all the way up to ACIRgen where they're eventually discarded. This means that we need to spend time processing them and memory storing them, their (empty) results and callstack entries.We can instead just discard them at any point after the runtime separation pass so we don't need to consider them at all.
The text was updated successfully, but these errors were encountered: