Commit 76098f45 authored by Sergei Golubchik's avatar Sergei Golubchik

RocksDB: workaround a compiler error on ppc64le

storage/rocksdb/rdb_datadic.cc: In member function 'int myrocks::Rdb_key_def::unpack_integer(myrocks::Rdb_field_packing*, Field*, uchar*, myrocks::Rdb_string_reader*, myrocks::Rdb_string_reader*) const'
storage/rocksdb/rdb_datadic.cc:1781:1: internal compiler error: Segmentation fault
 }

on ppc64le, ubuntu bionic gcc 7.3.0 and debian stretch gcc 6.3.0

The error happens with -ftree-loop-vectorize when trying to vectorize
a particular loop (see Rdb_key_def::unpack_integer())

Compiler gets confused by __attribute__((optimize("O0")) that comes from
ha_rocksdb_proto.h. The intention of this __attribute__ was to prevent
function from being inlined (see ha_rocksdb.cc). Let's use a more
specific attribute that prevents inlining but does not confuse
loop vectorizer.
parent 2b45eb77
......@@ -43,7 +43,7 @@ void rdb_handle_io_error(const rocksdb::Status status,
#if defined(__clang__)
MY_ATTRIBUTE((optnone));
#else
MY_ATTRIBUTE((optimize("O0")));
MY_ATTRIBUTE((noinline,noclone));
#endif
int rdb_normalize_tablename(const std::string &tablename, std::string *str)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment