llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.8k stars 11.45k forks source link

compilation does not termintate with elevated inline-threshold #47161

Open 47089556-bf4e-479e-814d-280f07395991 opened 3 years ago

47089556-bf4e-479e-814d-280f07395991 commented 3 years ago
Bugzilla Link 47817
Version 10.0
OS Linux
CC @psarna

Extended Description

This is with 10.0.0, but I've also seen it happen with 11 (another file, and with a higher limit).

Command line:

clang++ -MD -MT build/release/test/boost/broken_sstable_test.o -MF build/release/test/boost/broken_sstable_test.o.d -I/home/avi/scylla/seastar/include -I/home/avi/scylla/build/release/seastar/gen/include -std=gnu++20 -U_FORTIFY_SOURCE -DSEASTAR_SSTRING -march=westmere -DSEASTAR_API_LEVEL=6 -DSEASTAR_HAVE_DPDK -DFMT_LOCALE -DFMT_SHARED -I/usr/include/p11-kit-1 -Wl,--gc-sections -O3 -ffunction-sections -fdata-sections -mllvm -inline-threshold=2500 -g -gz -iquote. -iquote build/release/gen --std=gnu++20 -ffile-prefix-map=/home/avi/scylla=. -march=westmere -DBOOST_TEST_DYN_LINK -I abseil -fvisibility=hidden -Wall -Werror -Wno-mismatched-tags -Wno-tautological-compare -Wno-parentheses-equality -Wno-c++11-narrowing -Wno-c++1z-extensions -Wno-sometimes-uninitialized -Wno-return-stack-address -Wno-missing-braces -Wno-unused-lambda-capture -Wno-misleading-indentation -Wno-overflow -Wno-noexcept-type -Wno-error=cpp -Wno-ignored-attributes -Wno-overloaded-virtual -Wno-unused-command-line-argument -Wno-inconsistent-missing-override -Wno-defaulted-function-deleted -Wno-redeclared-class-member -Wno-pessimizing-move -Wno-redundant-move -Wno-gnu-designator -Wno-instantiation-after-specialization -Wno-unused-private-field -Wno-unsupported-friend -Wno-unused-variable -Wno-return-std-move -Wno-delete-non-abstract-non-virtual-dtor -Wno-unknown-attributes -Wno-braced-scalar-init -Wno-unused-value -Wno-range-loop-construct -Wno-unused-function -Wno-implicit-int-float-conversion -Wno-delete-abstract-non-virtual-dtor -Wno-error=deprecated-declarations -DXXH_PRIVATE_API -DSEASTAR_TESTING_MAIN -DHAVE_LZ4_COMPRESS_DEFAULT -c preprocessed.cc

Reproducer: http://scratch.scylladb.com/preprocessed.cc (too large to attach)

47089556-bf4e-479e-814d-280f07395991 commented 2 years ago

mentioned in issue llvm/llvm-bugzilla-archive#48857

psarna commented 3 years ago

I reproduced with clang 11.0.0 (Fedora 11.0.0-2.fc33):

clang++ -std=gnu++20 -march=westmere -ffunction-sections -fdata-sections -mllvm -inline-threshold=2500 -O3 -g -gz --std=gnu++20 -fcolor-diagnostics -ffile-prefix-map=/home/sarna/repo/scylla=. -march=westmere -fvisibility=hidden -Wall -Wno-mismatched-tags -Wno-tautological-compare -Wno-parentheses-equality -Wno-c++11-narrowing -Wno-c++1z-extensions -Wno-sometimes-uninitialized -Wno-return-stack-address -Wno-missing-braces -Wno-unused-lambda-capture -Wno-misleading-indentation -Wno-overflow -Wno-noexcept-type -Wno-error=cpp -Wno-ignored-attributes -Wno-overloaded-virtual -Wno-unused-command-line-argument -Wno-inconsistent-missing-override -Wno-defaulted-function-deleted -Wno-redeclared-class-member -Wno-pessimizing-move -Wno-redundant-move -Wno-gnu-designator -Wno-instantiation-after-specialization -Wno-unused-private-field -Wno-unsupported-friend -Wno-unused-variable -Wno-return-std-move -Wno-delete-non-abstract-non-virtual-dtor -Wno-unknown-attributes -Wno-braced-scalar-init -Wno-range-loop-construct -Wno-unused-function -Wno-implicit-int-float-conversion -Wno-delete-abstract-non-virtual-dtor -Wno-uninitialized-const-reference -Wno-psabi -Wno-error=deprecated-declarations -Wl,--gc-sections -Werror -I/home/sarna/repo/scylla/seastar/include -I/home/sarna/repo/scylla/build/release/seastar/gen/include -U_FORTIFY_SOURCE -DSEASTAR_SSTRING -DSEASTAR_API_LEVEL=6 -DSEASTAR_HAVE_DPDK -DFMT_LOCALE -DFMT_SHARED -I/usr/include/p11-kit-1 -iquote. -iquote build/release/gen -DBOOST_TEST_DYN_LINK -I abseil -DXXH_PRIVATE_API -DSEASTAR_TESTING_MAIN -DHAVE_LZ4_COMPRESS_DEFAULT -c -o build/release/repair/row_level.o preprocessed.cc

File: http://scratch.scylladb.com/psarna/preprocessed.cc