-
Notifications
You must be signed in to change notification settings - Fork 13
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
Inefficient Register Allocation #183
Comments
Another case of inefficiency is the following:
Here, a single binary constraint is given for the underlying column:
However, if we do this then we get something surprising:
Then, in this case, we get two binarity constraints:
Which we can see in the final
|
That was a design choice that was supposed to help with value validity checking while importing traces. When debugging safeguards will become less important than traces size, it will be the time to implement your proposition. |
Yeah, overall now that I've dug through it and understand what's going on I think its working pretty well. I'm not sure we'll need much more optimisation. Its seems to be a lot of |
Consider an example like this:
We can see the register allocation performed by Corset:
The key is that it will not allocate
A
andB
to the same underlying column (i.e. register) because they nominally have different types. In fact, it is safe to do this because they are not being proven. However, there are flow on effects of allowing them to be allocated together: trace files need to use the maximum width of any column allocated to a register; the inspector will have to do the same.Overall, its not clear to me whether or not this optimisation will add any significant value. But it is worth considering at least. Note also that
i8@prove
andbyte@prove
will not be allocated together either.The text was updated successfully, but these errors were encountered: