Title: gh-148211: decompose `_POP_TOP_LOAD_CONST_INLINE(_BORROW)` in JIT by NekoAsakura · Pull Request #148230 · python/cpython · GitHub
Open Graph Title: gh-148211: decompose `_POP_TOP_LOAD_CONST_INLINE(_BORROW)` in JIT by NekoAsakura · Pull Request #148230 · python/cpython
X Title: gh-148211: decompose `_POP_TOP_LOAD_CONST_INLINE(_BORROW)` in JIT by NekoAsakura · Pull Request #148230 · python/cpython
Description: The composite uop definitions in bytecodes.c are kept for now — remove_unneeded_uops still produces them as intermediate forms during push/pop cancellation. cpython/Python/optimizer_analysis.c Lines 610 to 653 in 4ff8b07 const uint16_t op_without_push[MAX_UOP_ID + 1] = { [_COPY] = _NOP, [_LOAD_CONST_INLINE] = _NOP, [_LOAD_CONST_INLINE_BORROW] = _NOP, [_LOAD_CONST_UNDER_INLINE] = _POP_TOP_LOAD_CONST_INLINE, [_LOAD_CONST_UNDER_INLINE_BORROW] = _POP_TOP_LOAD_CONST_INLINE_BORROW, [_LOAD_FAST] = _NOP, [_LOAD_FAST_BORROW] = _NOP, [_LOAD_SMALL_INT] = _NOP, [_POP_TOP_LOAD_CONST_INLINE] = _POP_TOP, [_POP_TOP_LOAD_CONST_INLINE_BORROW] = _POP_TOP, [_POP_TWO_LOAD_CONST_INLINE_BORROW] = _POP_TWO, [_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW] = _POP_CALL_ONE, [_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW] = _POP_CALL_TWO, [_SHUFFLE_2_LOAD_CONST_INLINE_BORROW] = _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW, }; const bool op_skip[MAX_UOP_ID + 1] = { [_NOP] = true, [_CHECK_VALIDITY] = true, [_CHECK_PERIODIC] = true, [_SET_IP] = true, }; const uint16_t op_without_pop[MAX_UOP_ID + 1] = { [_POP_TOP] = _NOP, [_POP_TOP_NOP] = _NOP, [_POP_TOP_INT] = _NOP, [_POP_TOP_FLOAT] = _NOP, [_POP_TOP_UNICODE] = _NOP, [_POP_TOP_LOAD_CONST_INLINE] = _LOAD_CONST_INLINE, [_POP_TOP_LOAD_CONST_INLINE_BORROW] = _LOAD_CONST_INLINE_BORROW, [_POP_TWO] = _POP_TOP, [_POP_TWO_LOAD_CONST_INLINE_BORROW] = _POP_TOP_LOAD_CONST_INLINE_BORROW, [_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW] = _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW, [_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW] = _POP_CALL_LOAD_CONST_INLINE_BORROW, [_POP_CALL_TWO] = _POP_CALL_ONE, [_POP_CALL_ONE] = _POP_CALL, }; const uint16_t op_without_pop_null[MAX_UOP_ID + 1] = { [_POP_CALL] = _POP_TOP, [_POP_CALL_LOAD_CONST_INLINE_BORROW] = _POP_TOP_LOAD_CONST_INLINE_BORROW, }; Specifically, these composites chain through _POP_TOP_LOAD_CONST_INLINE_BORROW in the op_without_push / op_without_pop / op_without_pop_null tables: _POP_TWO_LOAD_CONST_INLINE_BORROW _POP_CALL_LOAD_CONST_INLINE_BORROW _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW _SHUFFLE_2_LOAD_CONST_INLINE_BORROW Additionally, _LOAD_CONST_UNDER_INLINE(_BORROW) references _POP_TOP_LOAD_CONST_INLINE(_BORROW) as a target in op_without_push — those table entries would need updating too. Once these dependents are decomposed, the definitions can be fully removed. Issue: gh-148211
Open Graph Description: The composite uop definitions in bytecodes.c are kept for now — remove_unneeded_uops still produces them as intermediate forms during push/pop cancellation. cpython/Python/optimizer_...
X Description: The composite uop definitions in bytecodes.c are kept for now — remove_unneeded_uops still produces them as intermediate forms during push/pop cancellation. cpython/Python/optimizer_...
Opengraph URL: https://github.com/python/cpython/pull/148230
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:386bc892-414d-4561-b716-fee234d0f2bf |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 97B6:27E2F7:AC8397:E7DD12:6A531931 |
| html-safe-nonce | 4f4a1240677eb4734c3393826286e9cd66be041ca41d92c7a028e49cdbcd8bc9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0I2OjI3RTJGNzpBQzgzOTc6RTdERDEyOjZBNTMxOTMxIiwidmlzaXRvcl9pZCI6IjI4NDA2MDAzOTEwNjU5OTk2NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 16beeaff9edc4d8432ec8709e96fddc290217d3f1bbd1d36ec4e43139ba474b6 |
| hovercard-subject-tag | pull_request:3499747708 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/148230/files |
| twitter:image | https://avatars.githubusercontent.com/u/72689291?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/72689291?s=400&v=4 |
| og:image:alt | The composite uop definitions in bytecodes.c are kept for now — remove_unneeded_uops still produces them as intermediate forms during push/pop cancellation. cpython/Python/optimizer_... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width