Skip to content

JIT optimizer cleanups #143421

Description

@Fidget-Spinner

Feature or enhancement

Proposal:

Currently the JIT uop buffer modifies uops traces in place.

I think we should make it add to a new buffer. Having modifications be in-place is making our code messy and full of special cases.

So

REPLACE_OP(this_instr, ...)

should become

ADD_OP(ctx, ...)

in optimizer_bytecodes.c,

Also, the default generated case of optimizer_bytecodes.c should be to ADD_OP(pc, ...)

This is also blocking optimization in #143414, as ocassionally we need to insert extra guards to check the uniqueness of an object for example.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions