-
Notifications
You must be signed in to change notification settings - Fork 5.5k
ZJIT: Avoid splitting add_into/sub_into for x86_64 #14177
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
Conversation
@@ -1889,9 +1889,8 @@ impl Assembler { | |||
out | |||
} | |||
|
|||
pub fn add_into(&mut self, left: Opnd, right: Opnd) -> Opnd { | |||
pub fn add_into(&mut self, left: Opnd, right: Opnd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love that this breaks SSA if we use a vreg operand as an argument. Can we require it only take memory/phyreg? (here and below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed them to only take Opnd::Reg
for now a43e62e since it's the only expected usage of them.
Btw if you want LIR to be SSA, you need to fix cpop_into
, lea_into
, load_into
, mov
, and store
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the change. Didn't know that. I thought LIR was SSA...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost. You can make it happen with just ^. We just haven't come up with anything that needs the guarantee yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sketching in #14188
❌ Tests Failed✖️no tests failed ✔️62266 tests passed(1 flake) |
This PR addresses #14154 (comment).
On x86_64, we were splitting
asm.add_into
to two instructions. By fixing it, this PR also updatesasm.sub_into
to use an implementation that looks similar toasm.add_into
.Before
add_into
in concatstrings looked like this:After
It's now:
The instructions generated by
sub_into
in concatstrings stayed the same because merging sub + mov works fine.