summaryrefslogtreecommitdiffstats
path: root/Python/optimizer_analysis.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2025-04-01 23:55:05 (GMT)
committerGitHub <noreply@github.com>2025-04-01 23:55:05 (GMT)
commit3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce (patch)
treef30e2b51ec12b18e0bc26d27bd95fa3283b4cf64 /Python/optimizer_analysis.c
parent1a9d4a1fb3d4beda7c7e8483af7c6bc7ac477e9f (diff)
downloadcpython-3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce.zip
cpython-3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce.tar.gz
cpython-3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce.tar.bz2
GH-131726: Split up _CHECK_VALIDITY_AND_SET_IP (GH-131810)
Diffstat (limited to 'Python/optimizer_analysis.c')
-rw-r--r--Python/optimizer_analysis.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c
index afaf2e0..ab28fae 100644
--- a/Python/optimizer_analysis.c
+++ b/Python/optimizer_analysis.c
@@ -554,16 +554,6 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
buffer[pc].opcode = _NOP;
}
break;
- case _CHECK_VALIDITY_AND_SET_IP:
- if (may_have_escaped) {
- may_have_escaped = false;
- buffer[pc].opcode = _CHECK_VALIDITY;
- }
- else {
- buffer[pc].opcode = _NOP;
- }
- last_set_ip = pc;
- break;
case _POP_TOP:
{
_PyUOpInstruction *last = &buffer[pc-1];
@@ -597,13 +587,8 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
may_have_escaped = true;
}
if (needs_ip && last_set_ip >= 0) {
- if (buffer[last_set_ip].opcode == _CHECK_VALIDITY) {
- buffer[last_set_ip].opcode = _CHECK_VALIDITY_AND_SET_IP;
- }
- else {
- assert(buffer[last_set_ip].opcode == _NOP);
- buffer[last_set_ip].opcode = _SET_IP;
- }
+ assert(buffer[last_set_ip].opcode == _NOP);
+ buffer[last_set_ip].opcode = _SET_IP;
last_set_ip = -1;
}
}