Rename tier 2 redundancy eliminator to optimizer (#115888)

The original name is just too much of a mouthful.
This commit is contained in:
Guido van Rossum 2024-02-26 08:42:53 -08:00 committed by GitHub
parent 7259480957
commit c0fdfba7ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 30 additions and 30 deletions

View file

@ -1,5 +1,5 @@
/*
* This file contains the support code for CPython's uops redundancy eliminator.
* This file contains the support code for CPython's uops optimizer.
* It also performs some simple optimizations.
* It performs a traditional data-flow analysis[1] over the trace of uops.
* Using the information gained, it chooses to emit, or skip certain instructions
@ -606,7 +606,7 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer,
/* 1 for success, 0 for not ready, cannot error at the moment. */
static int
uop_redundancy_eliminator(
optimize_uops(
PyCodeObject *co,
_PyUOpInstruction *trace,
int trace_len,
@ -638,7 +638,7 @@ uop_redundancy_eliminator(
_PyUOpName(opcode),
oparg);
switch (opcode) {
#include "tier2_redundancy_eliminator_cases.c.h"
#include "optimizer_cases.c.h"
default:
DPRINTF(1, "Unknown opcode in abstract interpreter\n");
@ -812,7 +812,7 @@ _Py_uop_analyze_and_optimize(
char *uop_optimize = Py_GETENV("PYTHONUOPSOPTIMIZE");
if (uop_optimize != NULL && *uop_optimize > '0') {
err = uop_redundancy_eliminator(
err = optimize_uops(
(PyCodeObject *)frame->f_executable, buffer,
buffer_size, curr_stacklen, dependencies);
}

View file

@ -1,6 +1,6 @@
// This file is generated by Tools/cases_generator/tier2_abstract_generator.py
// This file is generated by Tools/cases_generator/optimizer_generator.py
// from:
// Python/tier2_redundancy_eliminator_bytecodes.c
// Python/optimizer_bytecodes.c
// Do not edit!
case _NOP: {