mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
gh-129987: Disable GCC SLP autovectorization for the interpreter loop on x86-64 (#132295)
The SLP autovectorizer can cause poor code generation for opcode dispatch, negating any benefit we get from vectorization elsewhere in the interpreter loop.
This commit is contained in:
parent
67ded6a4fa
commit
1f5682f3a2
1 changed files with 12 additions and 1 deletions
|
@ -948,7 +948,18 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
|
|||
#include "generated_cases.c.h"
|
||||
#endif
|
||||
|
||||
PyObject* _Py_HOT_FUNCTION
|
||||
#if (defined(__GNUC__) && !defined(__clang__)) && defined(__x86_64__)
|
||||
/*
|
||||
* gh-129987: The SLP autovectorizer can cause poor code generation for opcode
|
||||
* dispatch, negating any benefit we get from vectorization elsewhere in the
|
||||
* interpreter loop.
|
||||
*/
|
||||
#define DONT_SLP_VECTORIZE __attribute__((optimize ("no-tree-slp-vectorize")))
|
||||
#else
|
||||
#define DONT_SLP_VECTORIZE
|
||||
#endif
|
||||
|
||||
PyObject* _Py_HOT_FUNCTION DONT_SLP_VECTORIZE
|
||||
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
|
||||
{
|
||||
_Py_EnsureTstateNotNULL(tstate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue