KEMBAR78
gh-119726: emit AArch64 trampolines in the data section by diegorusso · Pull Request #121280 · python/cpython · GitHub
Skip to content

Conversation

@diegorusso
Copy link
Contributor

@diegorusso diegorusso commented Jul 2, 2024

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
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
Copy link
Member

@brandtbucher brandtbucher left a comment

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:

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
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