Open
Description
Feature or enhancement
Proposal:
I was looking at the IPA inlining dump as part of investigating the root cause of gh-132295 and noticed that we're inlining a number of slow path functions related to specialization, instrumentation, and error handling in the interpreter loop when performing LTO (full list here):
_Py_Specialize_CallKw
_Py_Specialize_CompareOp
_Py_Specialize_ContainsOp
_Py_Specialize_ForIter
_Py_Specialize_LoadGlobal
_Py_Specialize_LoadSuperAttr
_Py_Specialize_Send
_Py_Specialize_StoreAttr
_Py_Specialize_StoreSubscr
_Py_Specialize_ToBool
_Py_Specialize_UnpackSequence
_Py_call_instrumentation
_Py_call_instrumentation_instruction
_Py_call_instrumentation_line
get_exception_handler
I suspect these are being inlined because we use unit tests for collecting PGO data. These should be executed relatively infrequently for "normal" Python code. We should mark them as noinline
.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response