Skip to content

Commit 2a69208

Browse files
author
Ping Zhao
committed
Fix the BOLT problem with GCC10
BOLT requires adding GCC option "-fno-reorder-blocks-and-partition". In some codes, it will be omitted because "GCC push_options". This patch is to handle this case correctly.
1 parent 829f297 commit 2a69208

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

Zend/zend_vm_execute.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52134,6 +52134,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDL
5213452134
# pragma GCC push_options
5213552135
# pragma GCC optimize("no-gcse")
5213652136
# pragma GCC optimize("no-ivopts")
52137+
# pragma GCC optimize("no-reorder-blocks-and-partition")
5213752138
#endif
5213852139
ZEND_API void execute_ex(zend_execute_data *ex)
5213952140
{

Zend/zend_vm_execute.skl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# pragma GCC push_options
55
# pragma GCC optimize("no-gcse")
66
# pragma GCC optimize("no-ivopts")
7+
# pragma GCC optimize("no-reorder-blocks-and-partition")
78
#endif
89
ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *ex)
910
{

ext/hash/xxhash/xxhash.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,6 +2934,7 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
29342934
&& defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */
29352935
# pragma GCC push_options
29362936
# pragma GCC optimize("-O2")
2937+
# pragma GCC optimize("no-reorder-blocks-and-partition")
29372938
#endif
29382939

29392940

ext/standard/crc32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static inline int has_crc32_insn() {
6262
# if defined(__GNUC__) && !defined(__clang__)
6363
# pragma GCC push_options
6464
# pragma GCC target ("+nothing+crc")
65+
# pragma GCC optimize("no-reorder-blocks-and-partition")
6566
# endif
6667
static uint32_t crc32_aarch64(uint32_t crc, const char *p, size_t nr) {
6768
while (nr >= sizeof(uint64_t)) {

0 commit comments

Comments
 (0)