Skip to content

gh-119726: emit AArch64 trampolines in the data section - #121280

Merged
brandtbucher merged 2 commits into
python:mainfrom
diegorusso:gh-119726-trampolines-data
Jul 3, 2024
Merged

brandtbucher merged 2 commits into
python:mainfrom
diegorusso:gh-119726-trampolines-data

Conversation

@diegorusso

@diegorusso diegorusso commented Jul 2, 2024 •

Copy link
Copy Markdown
Contributor

Emit AArch64 trampolines in the data section (instead of the code) of the stencil. In many cases this allows the branch to the next micro-op at the end of the stencil to be replaced with a fall-through NOP.

Emit AArch64 trampolines in the data section (instead of the code) of
the stencil. In many cases this allows the branch to the next micro-op
at the end of the stencil to be replaced with a fall-through NOP.
@diegorusso

Copy link
Copy Markdown
Contributor Author

@brandtbucher I have provided a news entry but I feel we can skip it for the PR. Let me know what you think.

@brandtbucher brandtbucher self-assigned this Jul 2, 2024
@brandtbucher brandtbucher added performance Performance or resource usage skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT and removed skip news labels Jul 2, 2024

@brandtbucher brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just one minor comment:

Comment thread Misc/NEWS.d/next/Core and Builtins/2024-06-28-18-34-49.gh-issue-119726.Fjv_Ab.rst Outdated
Comment thread Tools/jit/_stencils.py
instruction &= 0xFC000000
instruction |= ((base - hole.offset) >> 2) & 0x03FFFFFF
self.body[where] = instruction.to_bytes(4, sys.byteorder)
new_hole = hole.replace(addend=base, symbol=None, value=HoleValue.DATA)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so much nicer!

…e-119726.Fjv_Ab.rst

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@brandtbucher
brandtbucher merged commit 84512c0 into python:main Jul 3, 2024
@diegorusso
diegorusso deleted the gh-119726-trampolines-data branch July 3, 2024 13:36
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage topic-JIT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants