There was an error while loading. Please reload this page.
1 parent bee112a commit 51410d8Copy full SHA for 51410d8
1 file changed
Python/ceval.c
@@ -761,6 +761,16 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
761
* so consume 3 units of C stack */
762
#define PY_EVAL_C_STACK_UNITS 2
763
764
+#if defined(_MSC_VER) && defined(_Py_USING_PGO) && defined(_Py_JIT)
765
+/* _PyEval_EvalFrameDefault is too large to optimize for speed with
766
+ PGO on MSVC when the JIT is enabled. Disable that optimization
767
+ around this function only. If this is fixed upstream, we should
768
+ gate this on the version of MSVC.
769
+ */
770
+# pragma optimize("t", off)
771
+/* This setting is reversed below following _PyEval_EvalFrameDefault */
772
+#endif
773
+
774
PyObject* _Py_HOT_FUNCTION
775
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
776
{
@@ -1136,6 +1146,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
1136
1146
1137
1147
}
1138
1148
1149
1150
+# pragma optimize("", on)
1151
1152
1139
1153
#if defined(__GNUC__)
1140
1154
# pragma GCC diagnostic pop
1141
1155
#elif defined(_MSC_VER) /* MS_WINDOWS */
0 commit comments