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

Relax instruction conventions in word_alloc #1036

Open
tanyongkiam opened this issue Aug 6, 2024 · 2 comments
Open

Relax instruction conventions in word_alloc #1036

tanyongkiam opened this issue Aug 6, 2024 · 2 comments

Comments

@tanyongkiam
Copy link
Contributor

The SSA pass currently forces the allocator to use fixed registers for instructions like LongMul following the requirements of x64.

It should be relaxed.

@tanyongkiam
Copy link
Contributor Author

After some initial experimentation, I decided not to implement this for now.

It is not too difficult to add this in wordLang (every relevant pass gains a flag to control its behavior on LongMul).

However, word-to-stack for LongMul appears significantly more complicated because one needs to respect the register conventions even when some of the arguments are spilled.

@tanyongkiam
Copy link
Contributor Author

In https://github.com/CakeML/cakeml/blob/master/compiler/backend/semantics/wordPropsScript.sml#L3309

Some of the restrictions for inst_ok_less can be simplified (if we assume that inst_arg_convention gets forced by SSA)

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

1 participant