Skip to content

ZJIT: Add option to dump LIR #13139

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

Merged
merged 1 commit into from
Apr 22, 2025
Merged

ZJIT: Add option to dump LIR #13139

merged 1 commit into from
Apr 22, 2025

Conversation

tekknolagi
Copy link
Contributor

Now we can dump HIR, optimized HIR, LIR, and assembly.

plum% ../build-dev/miniruby --zjit-dump-hir --zjit-dump-lir /tmp/defint.rb
HIR:
fn foo:
bb0():
  v1:Fixnum[5] = Const Value(5)
  Return v1

LIR:
fn foo:
Assembler
    000 Label() -> None
    001 FrameSetup() -> None
    002 Add(A64Reg { num_bits: 64, reg_no: 19 }, 38_u64) -> Out64(0)
    003 Mov(A64Reg { num_bits: 64, reg_no: 19 }, Out64(0)) -> None
    004 Mov(Mem64[Reg(20) + 16], A64Reg { num_bits: 64, reg_no: 19 }) -> None
    005 FrameTeardown() -> None
    006 CRet(Value(VALUE(11))) -> None
plum%

Copy link

launchable-app bot commented Apr 19, 2025

All Tests passed!

✖️no tests failed ✔️61943 tests passed(1 flake)

@tekknolagi
Copy link
Contributor Author

oh huh i just realized it didn't add @ruby/yjit to review it

@k0kubun
Copy link
Member

k0kubun commented Apr 22, 2025

Can you use ZJIT: instead of [zjit] as the prefix for PR and commit messages? We use [xxx] for [DOC] and changes copied from other repositories, but we use xxx: for Ruby core and YJIT changes. So I expected we would use ZJIT:.

@tekknolagi tekknolagi closed this Apr 22, 2025
@tekknolagi tekknolagi reopened this Apr 22, 2025
@matzbot matzbot requested a review from a team April 22, 2025 15:57
@tekknolagi
Copy link
Contributor Author

Sure -- I don't think I manually used [zjit] -- I think some tool added it

Now we can dump HIR, optimized HIR, LIR, and assembly.
@tekknolagi tekknolagi changed the title [zjit] Add option to dump LIR ZJIT: Add option to dump LIR Apr 22, 2025
@k0kubun k0kubun enabled auto-merge (squash) April 22, 2025 16:02
@k0kubun k0kubun disabled auto-merge April 22, 2025 16:17
@k0kubun k0kubun merged commit 9fc5a5d into ruby:master Apr 22, 2025
79 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants