Skip to content

Refactor the JIT uops #148211

@Fidget-Spinner

Description

@Fidget-Spinner

Feature or enhancement

Proposal:

The JIT optimizer initially only allowed a inplace op rewrites. This led to us contorting the JIT uops to fit that.

Now that the JIT optimizer allows more than one op to be written at once, we should clean up and de-duplicate all the composite uops.

E.g.

REPLACE_OP(_POP_TOP_LOAD_CONST_INLINE_BORROW, ..)

should become

ADD_OP(_POP_TOP, ...)
ADD_OP(_LOAD_CONST_INLINE_BORROW, ...)

and _POP_TOP_LOAD_CONST_INLINE_BORROW should then be completely removed from the JIT uops and bytecodes.c. This will allow us to de-duplicate and refactor the code greatly, while making the existing optimizations also more effective as we don't have to do as much repeated work.

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:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-JITtype-featureA feature request or enhancementtype-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions