Skip to content
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Mark Shannon <mark@hotpy.org>
  • Loading branch information
iritkatriel and markshannon authored Dec 6, 2024
commit aced06a9dca0188b0148c5382ee95b0e6411748c
6 changes: 3 additions & 3 deletions InternalDocs/jit.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The optimizer that `_PyOptimizer_Optimize()` runs is configurable via the
`_Py_SetTier2Optimizer()` function (this is used in test via
`_testinternalcapi.set_optimizer()`.)

The micro-op optimizer (abbreviated `uop` to approximate `μop`) is defined in
The micro-op (abbreviated `uop` to approximate `μop`) optimizer is defined in
[`Python/optimizer.c`](../Python/optimizer.c) as the type `_PyUOpOptimizer_Type`.
It translates an instruction trace into a sequence of micro-ops by replacing
each bytecode by an equivalent sequence of micro-ops (see
Expand All @@ -52,9 +52,9 @@ which is generated from [`Python/bytecodes.c`](../Python/bytecodes.c)).
The micro-op sequence is then optimized by
`_Py_uop_analyze_and_optimize` in
[`Python/optimizer_analysis.c`](../Python/optimizer_analysis.c)
and a `_PyUOpExecutor_Type` is created to contain it.
and an instance of `_PyUOpExecutor_Type` is created to contain it.

## Debugging a uop executor in the JIT interpreter
## The JIT interpreter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a sentence or two saying why we have this strange looking interpreter?
Being able to debug and analyze the optimizations prior independent of machine code generation is vey valuable.

After a `JUMP_BACKWARD` instruction invokes the uop optimizer to create a uop
executor, it transfers control to this executor via the `GOTO_TIER_TWO` macro.
Expand Down
Loading