Skip to content

Commit 9e52e55

Browse files
authored
gh-129244: Remove workaround for MSVC compiler crash (#129263)
* Remove compiler workaround * Remote _Py_USING_PGO
1 parent 9682a88 commit 9e52e55

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

PCbuild/pyproject.props

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<ClCompile>
5454
<AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)Include\internal\mimalloc;$(GeneratedPyConfigDir);$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
5555
<PreprocessorDefinitions>WIN32;$(_Py3NamePreprocessorDefinition);$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PyStatsPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
56-
<PreprocessorDefinitions Condition="'$(SupportPGO)' and ($(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate')">_Py_USING_PGO=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
5756

5857
<Optimization>MaxSpeed</Optimization>
5958
<IntrinsicFunctions>true</IntrinsicFunctions>

Python/ceval.c

-21
Original file line numberDiff line numberDiff line change
@@ -766,23 +766,6 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
766766
#define PY_EVAL_C_STACK_UNITS 2
767767

768768

769-
/* _PyEval_EvalFrameDefault is too large to optimize for speed with PGO on MSVC
770-
when the JIT is enabled or GIL is disabled. Disable that optimization around
771-
this function only. If this is fixed upstream, we should gate this on the
772-
version of MSVC.
773-
*/
774-
#if (defined(_MSC_VER) && \
775-
defined(_Py_USING_PGO) && \
776-
(defined(_Py_JIT) || \
777-
defined(Py_GIL_DISABLED)))
778-
#define DO_NOT_OPTIMIZE_INTERP_LOOP
779-
#endif
780-
781-
#ifdef DO_NOT_OPTIMIZE_INTERP_LOOP
782-
# pragma optimize("t", off)
783-
/* This setting is reversed below following _PyEval_EvalFrameDefault */
784-
#endif
785-
786769
PyObject* _Py_HOT_FUNCTION
787770
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
788771
{
@@ -1171,10 +1154,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
11711154

11721155
}
11731156

1174-
#ifdef DO_NOT_OPTIMIZE_INTERP_LOOP
1175-
# pragma optimize("", on)
1176-
#endif
1177-
11781157
#if defined(__GNUC__)
11791158
# pragma GCC diagnostic pop
11801159
#elif defined(_MSC_VER) /* MS_WINDOWS */

0 commit comments

Comments
 (0)