René's URL Explorer Experiment


Title: gh-116168: Remove extra `_CHECK_STACK_SPACE` uops by lazorchakp · Pull Request #117242 · python/cpython · GitHub

Open Graph Title: gh-116168: Remove extra `_CHECK_STACK_SPACE` uops by lazorchakp · Pull Request #117242 · python/cpython

X Title: gh-116168: Remove extra `_CHECK_STACK_SPACE` uops by lazorchakp · Pull Request #117242 · python/cpython

Description: This PR reduces the number of _CHECK_STACK_SPACE operands in tier2 bytecode. Here's the basic design: Introduce a new tier2-only uop, _CHECK_STACK_SPACE_OPERAND, which contains the amount space to check in its operand. during uops optimization, calculate how much stack space we will need for the whole trace. Combine all _CHECK_STACK_SPACEs into a single _CHECK_STACK_SPACE_OPERAND. potential changes / refactors to consider: Merge combine_stack_space_checks with peephole_opt or remove_unneeded_uops? All the #ifdef Py_DEBUGs in the core logic here are kind of distracting. Not sure if there's a more preferable way to implement these safety checks. I'm wide open to feedback / criticism / suggestions! Issue: gh-116168

Open Graph Description: This PR reduces the number of _CHECK_STACK_SPACE operands in tier2 bytecode. Here's the basic design: Introduce a new tier2-only uop, _CHECK_STACK_SPACE_OPERAND, which contains the amount spac...

X Description: This PR reduces the number of _CHECK_STACK_SPACE operands in tier2 bytecode. Here's the basic design: Introduce a new tier2-only uop, _CHECK_STACK_SPACE_OPERAND, which contains the amount ...

Opengraph URL: https://github.com/python/cpython/pull/117242

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:734b1bc3-8a5b-bb93-57c1-3f7226e8f318
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8104:2598A1:FA3EA6:14CF58D:6A582D24
html-safe-noncedb8e30a29bb8bdde69e637e1799f5de52a9227007870d55a9d2113fcb913f7a1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTA0OjI1OThBMTpGQTNFQTY6MTRDRjU4RDo2QTU4MkQyNCIsInZpc2l0b3JfaWQiOiIyNjA4ODYwMTYwNjg1NzgwMjYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7b390628ee9e69d86452a7ed493ae1f508bafa6415691ed6623822dd392258b6
hovercard-subject-tagpull_request:1790577164
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/117242/files
twitter:imagehttps://avatars.githubusercontent.com/u/6841750?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/6841750?s=400&v=4
og:image:altThis PR reduces the number of _CHECK_STACK_SPACE operands in tier2 bytecode. Here's the basic design: Introduce a new tier2-only uop, _CHECK_STACK_SPACE_OPERAND, which contains the amount spac...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/117242/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F117242%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F117242%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/117242/files
Reloadhttps://github.com/python/cpython/pull/117242/files
Reloadhttps://github.com/python/cpython/pull/117242/files
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
gvanrossumhttps://github.com/gvanrossum
python:mainhttps://github.com/python/cpython/tree/main
lazorchakp:gh-116168-remove-extra-_check_stack_space-opshttps://github.com/lazorchakp/cpython/tree/gh-116168-remove-extra-_check_stack_space-ops
Conversation 46 https://github.com/python/cpython/pull/117242
Commits 20 https://github.com/python/cpython/pull/117242/commits
Checks 0 https://github.com/python/cpython/pull/117242/checks
Files changed https://github.com/python/cpython/pull/117242/files
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
gh-116168: Remove extra _CHECK_STACK_SPACE uops https://github.com/python/cpython/pull/117242/files#top
Show all changes 20 commits https://github.com/python/cpython/pull/117242/files
548fb94 gh-116168: Remove extra _CHECK_STACK_SPACE uops lazorchakp Mar 21, 2024 https://github.com/python/cpython/pull/117242/commits/548fb9452b04c4a4bcd9adf9b218e4bdb476c581
1a7cb94 Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Mar 26, 2024 https://github.com/python/cpython/pull/117242/commits/1a7cb94778d67f86029529974ed5791eb5cde46c
5eca7ca Assorted cleanup and pipeline fix lazorchakp Mar 26, 2024 https://github.com/python/cpython/pull/117242/commits/5eca7ca3fe7bab2c8e43b87ad104f48c87935555
76e540a Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Mar 26, 2024 https://github.com/python/cpython/pull/117242/commits/76e540a7de451137a7f28365df25c71e2124fc57
1b1d8e1 Fix loss of data warning and revert changes to optimizer.c lazorchakp Mar 26, 2024 https://github.com/python/cpython/pull/117242/commits/1b1d8e12b2d28e51dbc6819d4354d7ec8b9aa667
781590d Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Mar 26, 2024 https://github.com/python/cpython/pull/117242/commits/781590d05191eb2c338701d24ca97248c418479a
617e4f3 Move all _CHECK_STACK_SPACE consolidation to optimizer_analysis.c lazorchakp Mar 28, 2024 https://github.com/python/cpython/pull/117242/commits/617e4f30bb6daf4b215026a5a64cb0e2802e97b9
49a1fa9 Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Mar 28, 2024 https://github.com/python/cpython/pull/117242/commits/49a1fa9c23e5cf6d126ca74d9783252c2a12cd18
95ef823 Use get_co in peephole_opt lazorchakp Mar 28, 2024 https://github.com/python/cpython/pull/117242/commits/95ef8234f7b8da0cfa5365f02c859920b9557019
defdc2b clean up diff lazorchakp Mar 28, 2024 https://github.com/python/cpython/pull/117242/commits/defdc2b235c9c661b9e75d6b597e54ed94915ea5
df0d589 Update with PR feedback, still need to move logic to optimizer_byteco… lazorchakp Mar 29, 2024 https://github.com/python/cpython/pull/117242/commits/df0d5890ea0eb8cdb30699def05a2f0ce53b6866
83c57a2 Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Mar 29, 2024 https://github.com/python/cpython/pull/117242/commits/83c57a2579e8ee5f2d21f5f3a1d425af14f482bb
3f7ba5b Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Mar 29, 2024 https://github.com/python/cpython/pull/117242/commits/3f7ba5b9d91cb1d9fcd3e61b333814d20ab1da54
c12119f Make combine_stack_space_checks as similar to peephole_opt as possible lazorchakp Mar 30, 2024 https://github.com/python/cpython/pull/117242/commits/c12119f9cde564f4a8d858c0ac1e6dea05a72348
f0b2133 Integrate combine_stack_space_checks with peephole_opt lazorchakp Mar 30, 2024 https://github.com/python/cpython/pull/117242/commits/f0b2133ef7a2282555bab9025266595aa03b0c2e
486ece6 Address style nits lazorchakp Apr 1, 2024 https://github.com/python/cpython/pull/117242/commits/486ece65e7808c7c61e2b448bb8eac7e7a2831c5
5b797e8 Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Apr 1, 2024 https://github.com/python/cpython/pull/117242/commits/5b797e8f4a49287a038ec65e72edabf221426dc6
64fac38 Undo accidental newline removal lazorchakp Apr 2, 2024 https://github.com/python/cpython/pull/117242/commits/64fac3835d99d56e0d5571b072f86933bd521c53
77e94cb Merge remote-tracking branch 'upstream/main' into gh-116168-remove-ex… lazorchakp Apr 3, 2024 https://github.com/python/cpython/pull/117242/commits/77e94cbad6357c46b77954bbed54f2a28c224eef
7b62c2b Fix variables names in large-framesize test comment lazorchakp Apr 3, 2024 https://github.com/python/cpython/pull/117242/commits/7b62c2be63e680b221ebcdb45a3acb664b2e5eb0
Clear filters https://github.com/python/cpython/pull/117242/files
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
pycore_uop_ids.h https://github.com/python/cpython/pull/117242/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
pycore_uop_metadata.h https://github.com/python/cpython/pull/117242/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
test_opt.py https://github.com/python/cpython/pull/117242/files#diff-67b5bd915e37f77df79907865982648172c27d3b96fbb072b30a73c6a2735439
_testinternalcapi.c https://github.com/python/cpython/pull/117242/files#diff-687f4a736f1f6ad4b6cd4ff65c8e0113408304e8d65530dbd41b3f59a081a126
bytecodes.c https://github.com/python/cpython/pull/117242/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
executor_cases.c.h https://github.com/python/cpython/pull/117242/files#diff-a1c3430c42a66c16e6d2e154491a6da993b187b27c628545a12a02c7b2a06b81
optimizer_analysis.c https://github.com/python/cpython/pull/117242/files#diff-eac5ab7e741b8b825a24d31a5bf844e86086431fb698cfcabe1277b68c375ca2
optimizer_cases.c.h https://github.com/python/cpython/pull/117242/files#diff-ed4567b3e67709ec57bf4df91ef058cfcbe00d7da11cd2a75e38241fa1ca99d2
Include/internal/pycore_uop_ids.hhttps://github.com/python/cpython/pull/117242/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
View file https://github.com/lazorchakp/cpython/blob/7b62c2be63e680b221ebcdb45a3acb664b2e5eb0/Include/internal/pycore_uop_ids.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
Include/internal/pycore_uop_metadata.hhttps://github.com/python/cpython/pull/117242/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
View file https://github.com/lazorchakp/cpython/blob/7b62c2be63e680b221ebcdb45a3acb664b2e5eb0/Include/internal/pycore_uop_metadata.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
Please reload this pagehttps://github.com/python/cpython/pull/117242/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.