summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2024-02-26 16:42:53 (GMT)
committerGitHub <noreply@github.com>2024-02-26 16:42:53 (GMT)
commitc0fdfba7ff981c55ac13325e4dddaf382601b246 (patch)
treee14685399610c911742e035a1c34cd61190ea112 /Python
parent7259480957e10359cc5ab8786f32f197c88e274c (diff)
downloadcpython-c0fdfba7ff981c55ac13325e4dddaf382601b246.zip
cpython-c0fdfba7ff981c55ac13325e4dddaf382601b246.tar.gz
cpython-c0fdfba7ff981c55ac13325e4dddaf382601b246.tar.bz2
Rename tier 2 redundancy eliminator to optimizer (#115888)
The original name is just too much of a mouthful.
Diffstat (limited to 'Python')
-rw-r--r--Python/optimizer_analysis.c8
-rw-r--r--Python/optimizer_bytecodes.c (renamed from Python/tier2_redundancy_eliminator_bytecodes.c)0
-rw-r--r--Python/optimizer_cases.c.h (renamed from Python/tier2_redundancy_eliminator_cases.c.h)4
3 files changed, 6 insertions, 6 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c
index 47bfc8c..1a9e829 100644
--- a/Python/optimizer_analysis.c
+++ b/Python/optimizer_analysis.c
@@ -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);
}
diff --git a/Python/tier2_redundancy_eliminator_bytecodes.c b/Python/optimizer_bytecodes.c
index b9afd30..b9afd30 100644
--- a/Python/tier2_redundancy_eliminator_bytecodes.c
+++ b/Python/optimizer_bytecodes.c
diff --git a/Python/tier2_redundancy_eliminator_cases.c.h b/Python/optimizer_cases.c.h
index ca341e4..e8146dc 100644
--- a/Python/tier2_redundancy_eliminator_cases.c.h
+++ b/Python/optimizer_cases.c.h
@@ -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: {