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

Lift spill slots to imaginary registers #293

Open
mysterymath opened this issue Mar 6, 2023 · 3 comments
Open

Lift spill slots to imaginary registers #293

mysterymath opened this issue Mar 6, 2023 · 3 comments
Labels
optimization Improving the speed or size of generated code p2

Comments

@mysterymath
Copy link
Member

The greedy register allocator is heuristic and imperfect; despite our best efforts, it may still spill values to the stack slot when it could have spilled them to imaginary registers. We should add a pass to lift spill slots to registers after register allocation; this should, in concert with copy propagation, reduce the amount of copying between static stack and imaginary registers.

@mysterymath mysterymath added optimization Improving the speed or size of generated code p1 labels Mar 6, 2023
@gandhi56
Copy link
Contributor

gandhi56 commented Apr 9, 2023

Is there a test that reflects this regression?

@johnwbyrd
Copy link
Member

I wouldn't call this a regression. This is an opportunity for improved quality of codegen.

@mysterymath
Copy link
Member Author

I'm just straight up working on a more modern register allocator to replace the one in LLVM. I'm leaving these bugs open for now, since they're the next best option if that falls through. But if it pans out, ill be able to close a half dozen or so bugs of this kind, and remove a lot of ugliness in the backend to boot.

@mysterymath mysterymath added p2 and removed p1 labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization Improving the speed or size of generated code p2
Projects
None yet
Development

No branches or pull requests

3 participants