Skip to content

gh-104909: Make LOAD_ATTR_PROPERTY a viable uop - #110560

Closed
gvanrossum wants to merge 3 commits into
python:mainfrom
gvanrossum:load-attr-uops
Closed

gh-104909: Make LOAD_ATTR_PROPERTY a viable uop#110560
gvanrossum wants to merge 3 commits into
python:mainfrom
gvanrossum:load-attr-uops

Conversation

@gvanrossum

@gvanrossumgvanrossum commented Oct 9, 2023

Copy link
Copy Markdown
Member

There are severe problems here.

LOAD_ATTR_PROPERTY takes a func_version cache entry an an fget cache entry, which need to be cross-checked (fget->func_version == func_version) but a single uop cannot reference two cache entries.

The immediate fix (after rearranging the cache entries) is to load fget onto the stack. However, this isn't safe, because it will break when DEOPT_IF() jumps back to the unspecialized opcode (since the stack is different).

Moreover, I needed to disable two assertions from the code generator. It's possible there's a better way, but I'd have to think, and it's not worth it unless we solve the other problem.

This draft PR just exists to find out what else CI finds.

@gvanrossum
gvanrossumforce-pushed the load-attr-uops branch 2 times, most recently from 2deceef to 067b489CompareNovember 1, 2023 22:59
@gvanrossumgvanrossum changed the title DRAFT: Load attr uopsgh-104909: Make LOAD_ATTR_PROPERTY a viable uopNov 18, 2023
@gvanrossum

Copy link
Copy Markdown
MemberAuthor

Alas, this will go nowhere. (See issue.)

@gvanrossum
gvanrossum deleted the load-attr-uops branch February 22, 2024 00:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@gvanrossum