Convert more uops to leave their inputs on the stack to be cleaned up by `_POP_TOP`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Feature or enhancement
Proposal:
This is a follow up to https://github.com/python/cpython/issues/134584
We have, in the JIT, optimizations to eliminate many _POP_TOP operations. To take advantage of that we have converted many uops to leave their operands on the stack and added subsequent _POP_TOPs to remove them.
See https://github.com/python/cpython/issues/134584 for many examples of how to do this and why it works.
However, there are still a few uops yet to do. These are:
- LIST_EXTEND
- DICT_UPDATE @Sacul0457
- SET_UPDATE @Sacul0457
- DICT_MERGE @NekoAsakura
- CALL_INTRINSIC_1 @Sacul0457
- CALL_INTRINSIC_2 @KevinH15291
In addition, POP_ITER, END_FOR and END_SEND can be implemented as macro ops, using POP_TOP to gain the benefit of the the POP_TOP optimization.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Linked PRs
- gh-145964
- gh-145979
- gh-146170
- gh-146177
- gh-146185
- gh-146190
- gh-146262
- gh-146329
- gh-146383
- gh-148227
- gh-148477
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza leyendo el issue de seguimiento 134584 para conocer el patrón de conversión descrito y revisa las uops restantes enumeradas: LIST_EXTEND, DICT_UPDATE, SET_UPDATE, DICT_MERGE, CALL_INTRINSIC_1 y CALL_INTRINSIC_2. Examina también cómo están representadas POP_ITER, END_FOR y END_SEND; se considera hecho cuando estas operaciones usan el enfoque propuesto de limpieza de la pila, pero los PRs enlazados muestran que ese trabajo ya está en curso.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- compilers, performance
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100