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

Promote instructions. #94

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Promote instructions. #94

merged 1 commit into from
Oct 30, 2024

Conversation

ltratt
Copy link
Contributor

@ltratt ltratt commented Oct 29, 2024

This allows yk to constant fold a lot of the resulting instruction decoding. The benefits of doing so can be significant: it speeds big_loop.lua up by about 38%!

Needs ykjit/yk#1441 to be merged first.

src/lvm.c Outdated Show resolved Hide resolved
@ltratt
Copy link
Contributor Author

ltratt commented Oct 29, 2024

This will need squashing as I realised I could simplify things mildly in 26294d4.

@vext01
Copy link
Contributor

vext01 commented Oct 30, 2024

please squash

This allows yk to constant fold a lot of the resulting instruction
decoding. The benefits of doing so can be significant: it speeds
big_loop.lua up by about 38%!
@ltratt
Copy link
Contributor Author

ltratt commented Oct 30, 2024

Squashed.

@vext01 vext01 added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2024
@ltratt
Copy link
Contributor Author

ltratt commented Oct 30, 2024

Ah, this might only work after ykjit/yk#1442 (and maybe ykjit/yk#1443) have merged. I don't think I fully tested it pre-1442.

@vext01
Copy link
Contributor

vext01 commented Oct 30, 2024

10:37:21 .thread '<unnamed>' panicked at ykrt/src/compile/jitc_yk/opt/mod.rs:74:41:
10:37:21 attempt to add with overflow

Is that the address space overflowing when adding the offset?

LLVM says about GEP:

The offsets are then added to the low bits of the base address up to the index type width, with silently-wrapping two’s complement arithmetic

@vext01
Copy link
Contributor

vext01 commented Oct 30, 2024

(ah we raced)

@ltratt
Copy link
Contributor Author

ltratt commented Oct 30, 2024

@vext01 With luck this one should now work.

@vext01 vext01 added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2024
@ltratt
Copy link
Contributor Author

ltratt commented Oct 30, 2024

@vext01 We can retry this now.

@vext01 vext01 added this pull request to the merge queue Oct 30, 2024
Merged via the queue into ykjit:main with commit bb0504c Oct 30, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants