-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler crash on MSVC when building with JIT and PGO #125217
Comments
Perhaps this is the same root cause as the crash with the free-threading build as well (just extra complexity in |
This problem is proving tricky to solve. In the past when we've seen this crash, it has been enough to disable speed optimizations on the single Just to confirm why PGO is so important, I measured its effect on the last known-working commit (04c837d) and PGO improves speed by about 14% on the pyperformance suite. So "just not using PGO on Windows" isn't a viable option.
In the meantime, now that I have a set of changes to point to, I can file a bug against MSVC. |
Here is the bug I filed against MSVC: https://developercommunity.visualstudio.com/t/C1001-when-compiling-very-large-function/10767031 |
Leaving a few possible alternatives just in case: _PyEval_EvalFrameDefault(...)
{
...
- uint8_t opcode; /* Current opcode */
+ uint16_t opcode; /* Current opcode */
...
#if USE_COMPUTED_GOTOS
_unknown_opcode:
#else
- EXTRA_CASES // From pycore_opcode_metadata.h, ...
+ default:
#endif Adding an extra _PyEval_EvalFrameDefault(...)
{
...
#if USE_COMPUTED_GOTOS
_unknown_opcode:
#else
EXTRA_CASES // From pycore_opcode_metadata.h, ...
+ case 500:
#endif I guess MSVC might want to merge the jump tables. |
… to avoid MSVC crash
… to avoid MSVC crash
Bug report
Bug description:
Building with the JIT and PGO simultaneously causes MSVC 1941 to crash:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: