Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,150 changes: 1,071 additions & 1,079 deletions 2,150 Include/internal/pycore_uop_ids.h

Large diffs are not rendered by default.

38 changes: 0 additions & 38 deletions 38 Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions 8 Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ def testfunc(n):
self.assertIsNotNone(ex)
uops = get_opnames(ex)
self.assertNotIn("_UNARY_INVERT", uops)
self.assertIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)
self.assertIn("_LOAD_CONST_INLINE_BORROW", uops)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_INSERT_1_LOAD_CONST_INLINE_BORROW has no op_without_push entry on main, therefore not simplified away by remove_unneeded_uops.


def test_compare_op_pop_two_load_const_inline_borrow(self):
def testfunc(n):
Expand Down Expand Up @@ -3192,8 +3192,8 @@ def f(n):
self.assertEqual(res, TIER2_THRESHOLD)
uops = get_opnames(ex)
self.assertNotIn("_LOAD_ATTR_METHOD_NO_DICT", uops)
self.assertNotIn("_LOAD_CONST_UNDER_INLINE", uops)
self.assertIn("_LOAD_CONST_UNDER_INLINE_BORROW", uops)
self.assertNotIn("_INSERT_1_LOAD_CONST_INLINE", uops)
self.assertIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)

def test_store_fast_refcount_elimination(self):
def foo(x):
Expand Down Expand Up @@ -4009,8 +4009,6 @@ class A:
self.assertIsNotNone(ex)
uops = get_opnames(ex)
self.assertNotIn("_REPLACE_WITH_TRUE", uops)
self.assertIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reason.

self.assertEqual(count_ops(ex, "_POP_TOP_NOP"), 1)

def test_attr_promotion_failure(self):
# We're not testing for any specific uops here, just
Expand Down
12 changes: 0 additions & 12 deletions 12 Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -5965,18 +5965,6 @@ dummy_func(
value = PyStackRef_FromPyObjectBorrow(ptr);
}

tier2 op(_LOAD_CONST_UNDER_INLINE, (ptr/4, old -- value, new)) {
new = old;
DEAD(old);
value = PyStackRef_FromPyObjectNew(ptr);
}

tier2 op(_LOAD_CONST_UNDER_INLINE_BORROW, (ptr/4, old -- value, new)) {
new = old;
DEAD(old);
value = PyStackRef_FromPyObjectBorrow(ptr);
}

tier2 op(_START_EXECUTOR, (executor/4 --)) {
#ifndef _Py_JIT
assert(current_executor == (_PyExecutorObject*)executor);
Expand Down
114 changes: 0 additions & 114 deletions 114 Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 4 Python/optimizer_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ const uint16_t op_without_push[MAX_UOP_ID + 1] = {
[_COPY] = _NOP,
[_LOAD_CONST_INLINE] = _NOP,
[_LOAD_CONST_INLINE_BORROW] = _NOP,
[_LOAD_CONST_UNDER_INLINE] = _POP_TOP_LOAD_CONST_INLINE,
[_LOAD_CONST_UNDER_INLINE_BORROW] = _POP_TOP_LOAD_CONST_INLINE_BORROW,
[_INSERT_1_LOAD_CONST_INLINE] = _POP_TOP_LOAD_CONST_INLINE,
[_INSERT_1_LOAD_CONST_INLINE_BORROW] = _POP_TOP_LOAD_CONST_INLINE_BORROW,
[_LOAD_FAST] = _NOP,
[_LOAD_FAST_BORROW] = _NOP,
[_LOAD_SMALL_INT] = _NOP,
Expand Down
12 changes: 6 additions & 6 deletions 12 Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,8 @@ dummy_func(void) {
PyTypeObject *type = sym_get_type(owner);
PyObject *name = get_co_name(ctx, oparg >> 1);
attr = lookup_attr(ctx, dependencies, this_instr, type, name,
_LOAD_CONST_UNDER_INLINE_BORROW,
_LOAD_CONST_UNDER_INLINE);
_INSERT_1_LOAD_CONST_INLINE_BORROW,
_INSERT_1_LOAD_CONST_INLINE);
self = owner;
}

Expand All @@ -935,8 +935,8 @@ dummy_func(void) {
PyTypeObject *type = sym_get_type(owner);
PyObject *name = get_co_name(ctx, oparg >> 1);
attr = lookup_attr(ctx, dependencies, this_instr, type, name,
_LOAD_CONST_UNDER_INLINE_BORROW,
_LOAD_CONST_UNDER_INLINE);
_INSERT_1_LOAD_CONST_INLINE_BORROW,
_INSERT_1_LOAD_CONST_INLINE);
self = owner;
}

Expand All @@ -945,8 +945,8 @@ dummy_func(void) {
PyTypeObject *type = sym_get_type(owner);
PyObject *name = get_co_name(ctx, oparg >> 1);
attr = lookup_attr(ctx, dependencies, this_instr, type, name,
_LOAD_CONST_UNDER_INLINE_BORROW,
_LOAD_CONST_UNDER_INLINE);
_INSERT_1_LOAD_CONST_INLINE_BORROW,
_INSERT_1_LOAD_CONST_INLINE);
self = owner;
}

Expand Down
38 changes: 6 additions & 32 deletions 38 Python/optimizer_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.