Skip to content

Unify branches and deopts in the tier 2 IR. #111848

Closed
@markshannon

Description

@markshannon

The basic premise of optimizing traces is that most branches are highly biased.
So we use DEOPT_IF to branch in the uncommon case.
However in the optimizer we may want to move work to exit branches, which needs jumps.
Unifying branches and jumps also simplifies the tier 2 interpreter and the JIT compiler.

So, let's merge jumps and branches, as follows:

  • Convert most, if not all jumps in the tier 2 code to DEOPT_IFs in bytecodes.c
  • Convert deopts into jumps internally to allow work like SET_IP to be sunk into exit branches.

See also #111610

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions