Skip to content
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

Conflict between Stack and Reg uses of the same vreg #14

Open
Amanieu opened this issue Sep 16, 2021 · 2 comments
Open

Conflict between Stack and Reg uses of the same vreg #14

Amanieu opened this issue Sep 16, 2021 · 2 comments

Comments

@Amanieu
Copy link
Contributor

Amanieu commented Sep 16, 2021

Two uses of the same vreg on the same instruction causes an assertion failure if one of them is Stack and the other is Reg or FixedReg since it results in a minimal bundle that cannot be split.

We already handle the case of multiple conflicting FixedReg constraints, should we extend this to also cover the case of Stack/Reg conflicts?

@Amanieu
Copy link
Contributor Author

Amanieu commented Sep 16, 2021

This was not caught by the fuzzer because it never generates OperandConstraint::Stack.

@cfallin
Copy link
Member

cfallin commented Sep 16, 2021

Hmm, yes, right now specifying both is sort of a "user error", which is why the fuzzer doesn't generate that case.

I had created the Stack constraint basically with GC/stackmaps in mind, and the current design suits that, but I agree that making Stack more general (for explicit stack slots) means that we should probably support the multi-constraint case.

I'm happy to review a patch that does something like what we do for multi-fixed-regs, as you suggest; perhaps we can just rename the mechanism to "multi-constraints" or somesuch?

Amanieu added a commit to Amanieu/regalloc2 that referenced this issue Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants