summaryrefslogtreecommitdiffstats
path: root/Python/abstract_interp_cases.c.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-09-27 22:27:44 (GMT)
committerGitHub <noreply@github.com>2023-09-27 22:27:44 (GMT)
commit5bb6f0fcba663e1006f9063d1027ce8bd9f8effb (patch)
tree79cfb95b0d8d6582cfeca4f53b0a69ce2d24565f /Python/abstract_interp_cases.c.h
parent45cf5b0c69bb5c51f33fc681d90c45147e311ddf (diff)
downloadcpython-5bb6f0fcba663e1006f9063d1027ce8bd9f8effb.zip
cpython-5bb6f0fcba663e1006f9063d1027ce8bd9f8effb.tar.gz
cpython-5bb6f0fcba663e1006f9063d1027ce8bd9f8effb.tar.bz2
gh-104909: Split some more insts into ops (#109943)
These are the most popular specializations of `LOAD_ATTR` and `STORE_ATTR` that weren't already viable uops: * Split LOAD_ATTR_METHOD_WITH_VALUES * Split LOAD_ATTR_METHOD_NO_DICT * Split LOAD_ATTR_SLOT * Split STORE_ATTR_SLOT * Split STORE_ATTR_INSTANCE_VALUE Also: * Add `-v` flag to code generator which prints a list of non-viable uops (easter-egg: it can print execution counts -- see source) * Double _Py_UOP_MAX_TRACE_LENGTH to 128 I had dropped one of the DEOPT_IF() calls! :-(
Diffstat (limited to 'Python/abstract_interp_cases.c.h')
-rw-r--r--Python/abstract_interp_cases.c.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/Python/abstract_interp_cases.c.h b/Python/abstract_interp_cases.c.h
index 5a3848c..61b1db9 100644
--- a/Python/abstract_interp_cases.c.h
+++ b/Python/abstract_interp_cases.c.h
@@ -474,6 +474,31 @@
break;
}
+ case _LOAD_ATTR_SLOT: {
+ STACK_GROW(((oparg & 1) ? 1 : 0));
+ PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1 - (oparg & 1 ? 1 : 0))), true);
+ PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-(oparg & 1 ? 1 : 0))), true);
+ break;
+ }
+
+ case _GUARD_DORV_VALUES: {
+ break;
+ }
+
+ case _STORE_ATTR_INSTANCE_VALUE: {
+ STACK_SHRINK(2);
+ break;
+ }
+
+ case _GUARD_TYPE_VERSION_STORE: {
+ break;
+ }
+
+ case _STORE_ATTR_SLOT: {
+ STACK_SHRINK(2);
+ break;
+ }
+
case COMPARE_OP: {
STACK_SHRINK(1);
PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1)), true);
@@ -627,6 +652,28 @@
break;
}
+ case _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT: {
+ break;
+ }
+
+ case _GUARD_KEYS_VERSION: {
+ break;
+ }
+
+ case _LOAD_ATTR_METHOD_WITH_VALUES: {
+ STACK_GROW(1);
+ PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-2)), true);
+ PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1)), true);
+ break;
+ }
+
+ case _LOAD_ATTR_METHOD_NO_DICT: {
+ STACK_GROW(1);
+ PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-2)), true);
+ PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1)), true);
+ break;
+ }
+
case _CHECK_CALL_BOUND_METHOD_EXACT_ARGS: {
break;
}