GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BORROW)` in JIT · Issue #148235 · python/cpython

Remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT #148235

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT#148235
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@NekoAsakura
NekoAsakura
opened on Apr 8, 2026
Issue body actions

Feature or enhancement

Proposal:

_INSERT_1_LOAD_CONST_INLINE(_BORROW) and _LOAD_CONST_UNDER_INLINE(_BORROW) have identical stack effects — they're basically the same thing with different names.

cpython/Python/bytecodes.c

Lines 5927 to 5937 in 0b20bff

tier2 op(_INSERT_1_LOAD_CONST_INLINE, (ptr/4, left -- res, l)) {
res = PyStackRef_FromPyObjectNew(ptr);
l = left;
INPUTS_DEAD();
}
tier2 op(_INSERT_1_LOAD_CONST_INLINE_BORROW, (ptr/4, left -- res, l)) {
res = PyStackRef_FromPyObjectBorrow(ptr);
l = left;
INPUTS_DEAD();
}

cpython/Python/bytecodes.c

Lines 5968 to 5978 in 0b20bff

tier2 op(_LOAD_CONST_UNDER_INLINE, (ptr/4, old -- value, new)) {
new = old;
DEAD(old);
value = PyStackRef_FromPyObjectNew(ptr);
}
tier2 op(_LOAD_CONST_UNDER_INLINE_BORROW, (ptr/4, old -- value, new)) {
new = old;
DEAD(old);
value = PyStackRef_FromPyObjectBorrow(ptr);
}

_LOAD_CONST_UNDER_INLINE(_BORROW) already has entries in op_without_push, so remove_unneeded_uops can properly simplify it. However _INSERT_1 don't, thus we should rename all _INSERT_1 usages to _LOAD_CONST_UNDER and remove the duplicate definitions.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

#148230 (comment)

Linked PRs

  • gh-148235: remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT #148236

Activity

  1. NekoAsakura
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Apr 8, 2026
  2. NekoAsakura commented on Apr 8, 2026

    @NekoAsakura
    NekoAsakura
    on Apr 8, 2026
    MemberAuthor
    More actions

    cc: @Fidget-Spinner

  3. NekoAsakura
    added 2 commits that reference this issue on Apr 8, 2026

    pythongh-148235: remove duplicate uops `_INSERT_1_LOAD_CONST_INLINE(_…

    4f4d25d

    pythongh-148235: remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BOR…

    8af132b
  4. NekoAsakura
    changed the title [-]Remove duplicate uops `_INSERT_1_LOAD_CONST_INLINE(_BORROW)` in JIT[/-] [+]Remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BORROW)` in JIT[/+] on Apr 8, 2026
  5. NekoAsakura
    added a commit that references this issue on Apr 8, 2026

    pythongh-148235: remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BOR…

    5f63c41
  6. Fidget-Spinner
    added a commit that references this issue on Apr 8, 2026

    gh-148235: remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BORROW)` …

    7563585
  7. Fidget-Spinner commented on Apr 8, 2026

    @Fidget-Spinner
    Fidget-Spinner
    on Apr 8, 2026
    Member
    More actions

    In the future, smaller issues like these can go under #148211. Thanks!

  8. Fidget-Spinner
    closed this as completedon Apr 8, 2026
  9. ljfp
    added a commit that references this issue on Apr 25, 2026

    pythongh-148235: remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BOR…

    ebb1a4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.