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

YJIT: Remove Insn::RegTemps #7741

Merged
merged 2 commits into from Apr 19, 2023
Merged

YJIT: Remove Insn::RegTemps #7741

merged 2 commits into from Apr 19, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Apr 19, 2023

This PR refactors RegTemps handling. We currently copy RegTemps for every insn in Assembler, but this PR removes it by moving it to Opnd::Stack. This obviates assertion that checks asm.ctx.reg_temps and asm.reg_temps are consistent.

This also makes compilation faster.

before: ruby 3.3.0dev (2023-04-19T06:59:59Z master 7477284043) +YJIT [x86_64-linux]
after: ruby 3.3.0dev (2023-04-19T18:18:26Z yjit-reg-temps d91062cfb2) +YJIT [x86_64-linux]

----------  -----------  ----------  ----------  ----------  -------------  ------------
bench       before (ms)  stddev (%)  after (ms)  stddev (%)  after 1st itr  before/after
30k_ifelse  1519.3       0.0         1292.5      0.0         1.18           1.18
----------  -----------  ----------  ----------  ----------  -------------  ------------

@matzbot matzbot requested a review from a team April 19, 2023 18:32
yjit/src/core.rs Outdated Show resolved Hide resolved
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
@k0kubun k0kubun merged commit 2531bb0 into ruby:master Apr 19, 2023
97 checks passed
@k0kubun k0kubun deleted the yjit-reg-temps branch April 19, 2023 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants