[PATCH] D98213: [InlineCost] Enable the cost benefit analysis on FDO

Nathan Chancellor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 11:35:26 PDT 2021


nathanchance added a comment.

This patch as 9d375a40c3df90dd48edc0e1b1115c702c55d716 <https://reviews.llvm.org/rG9d375a40c3df90dd48edc0e1b1115c702c55d716> causes a segmentation fault with the following commands and this profdata.prof <https://github.com/nathanchance/bug-files/blob/6f6bf95166ac9e118df2ab98e038ef338007d9ef/D98213/profdata.prof.zst> file (zstd compressed).

  $ cmake \
  -B build/stage1 \
  -G Ninja \
  -Wno-dev \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" \
  -DLLVM_TARGETS_TO_BUILD=host \
  -DLLVM_USE_LINKER=lld \
  llvm &&
  ninja -C build/stage1
  
  $ cmake \
  -B build/stage2 \
  -G Ninja \
  -Wno-dev \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
  -DCMAKE_C_COMPILER=$PWD/build/stage1/bin/clang \
  -DCMAKE_CXX_COMPILER=$PWD/build/stage1/bin/clang++ \
  -DLLVM_ENABLE_LTO=Thin \
  -DLLVM_ENABLE_PROJECTS="clang;lld;polly" \
  -DLLVM_PROFDATA_FILE=$PWD/build/profdata.prof \
  -DLLVM_TARGETS_TO_BUILD="ARM;AArch64" \
  -DLLVM_USE_LINKER=lld \
  llvm &&
  ninja -C build/stage2
  ...
  [3416/3562] Linking CXX executable bin/clang-ast-dump
  FAILED: bin/clang-ast-dump
  : && /home/nathan/cbl/github/tc-build/llvm-project/build/stage1/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fprofile-instr-use="/home/nathan/cbl/github/tc-build/llvm-project/build/profdata.prof" -flto=thin -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics -fprofile-instr-use="/home/nathan/cbl/github/tc-build/llvm-project/build/profdata.prof" -flto=thin -Wl,--thinlto-cache-dir=/home/nathan/cbl/github/tc-build/llvm-project/build/stage2/lto.cache    -Wl,-O3 -Wl,--gc-sections tools/clang/lib/Tooling/DumpTool/CMakeFiles/clang-ast-dump.dir/ASTSrcLocProcessor.cpp.o tools/clang/lib/Tooling/DumpTool/CMakeFiles/clang-ast-dump.dir/ClangSrcLocDump.cpp.o -o bin/clang-ast-dump  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMOption.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMSupport.a  -lpthread  lib/libclangAST.a  lib/libclangASTMatchers.a  lib/libclangBasic.a  lib/libclangDriver.a  lib/libclangFrontend.a  lib/libclangSerialization.a  lib/libclangToolingCore.a  lib/libclangDriver.a  lib/libLLVMOption.a  lib/libclangParse.a  lib/libclangSema.a  lib/libclangEdit.a  lib/libclangAnalysis.a  lib/libclangASTMatchers.a  lib/libclangAST.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMProfileData.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMTextAPI.a  lib/libLLVMBitReader.a  lib/libclangRewrite.a  lib/libclangLex.a  lib/libclangBasic.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMMC.a  lib/libLLVMBinaryFormat.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  /usr/lib/x86_64-linux-gnu/libtinfo.so  lib/libLLVMDemangle.a && :
  clang-13: error: unable to execute command: Segmentation fault
  clang-13: error: linker command failed due to signal (use -v to see invocation)



  $ git bisect log
  # bad: [ee6a17eb9fc46c417d3d9ec11a218681e03bf18e] [NFC][LoopIdiom] Regenerate left-shift-until-bittest.ll
  # good: [8638c897f469dbd1d95b2e46b39ab72fb7b9d336] [WebAssembly] Remove unimplemented-simd target feature
  git bisect start 'ee6a17eb9fc46c417d3d9ec11a218681e03bf18e' '8638c897f469dbd1d95b2e46b39ab72fb7b9d336'
  # bad: [fd94cfeeb5d29340f46a46862720e53bd9106c1f] [RISCV] Move scheduling resources for B into a separate file (NFC)
  git bisect bad fd94cfeeb5d29340f46a46862720e53bd9106c1f
  # good: [1bc33eb6a32bdb193a8b838df823b4563450f6b3] [lld-macho][nfc] minor clean up, follow up to D98559
  git bisect good 1bc33eb6a32bdb193a8b838df823b4563450f6b3
  # good: [c7a39c833af173a7797692757b13b4b8eb801acd] [Coroutine][Clang] Force emit lifetime intrinsics for Coroutines
  git bisect good c7a39c833af173a7797692757b13b4b8eb801acd
  # bad: [9075864b7375b4eb8f2c0663caa575c0c667de7c] [BasicAA] Refactor linear expression decomposition
  git bisect bad 9075864b7375b4eb8f2c0663caa575c0c667de7c
  # bad: [203b072dd23b63174c9aa428b6f1c84859f43670] [CMake][gRPC] Fix a typo in protobuf version variable name
  git bisect bad 203b072dd23b63174c9aa428b6f1c84859f43670
  # good: [5f59f407f59f69c248be2452e5923e6735e7019a] [CSSPGO] Minor tweak for inline candidate priority tie breaker
  git bisect good 5f59f407f59f69c248be2452e5923e6735e7019a
  # bad: [0b1dc49ca38a8569b0aee40ea8d3054bc960e2ed] [NFC][OCaml] Resolve const and unsigned compilation warnings
  git bisect bad 0b1dc49ca38a8569b0aee40ea8d3054bc960e2ed
  # bad: [d92b4956d6db8904f6a21c0e037dd5161b843b87] [AMDGPU] Inline FSHRPattern into its only use. NFC.
  git bisect bad d92b4956d6db8904f6a21c0e037dd5161b843b87
  # bad: [9be8f8b34d9b150cd1811e3556fe9d0cd735ae29] [sanitizer] Simplify GetTls with dl_iterate_phdr
  git bisect bad 9be8f8b34d9b150cd1811e3556fe9d0cd735ae29
  # good: [3c775d93a1dda3cec3bb6c7617c4b4ab770f4af0] [InlineCost] Reject a zero entry count
  git bisect good 3c775d93a1dda3cec3bb6c7617c4b4ab770f4af0
  # bad: [9d375a40c3df90dd48edc0e1b1115c702c55d716] Reapply [InlineCost] Enable the cost benefit analysis on FDO
  git bisect bad 9d375a40c3df90dd48edc0e1b1115c702c55d716
  # first bad commit: [9d375a40c3df90dd48edc0e1b1115c702c55d716] Reapply [InlineCost] Enable the cost benefit analysis on FDO


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98213/new/

https://reviews.llvm.org/D98213



More information about the llvm-commits mailing list