[PATCH] D127531: [SLP]Improve analysis of same/alternate code ops and scheduling.

Kevin Athey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 14:28:12 PDT 2022


kda added a comment.

Looks like this is breaking MSAN buildbot: https://lab.llvm.org/buildbot/#/builders/74/builds/14584

Log snippet:

  [90/6916] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o
  FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o 
  /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/CodeGen -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/CodeGen -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/include -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include -nostdinc++ -isystem /b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/include -isystem /b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/include/c++/v1 -fsanitize=memory -fsanitize-memory-use-after-dtor -fsanitize-memory-param-retval -Oz -mllvm -sanitizer-early-opt-ep -Wl,--rpath=/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/lib -L/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/lib -w -stdlib=libc++ -fPIC -fno-semantic-interposition -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-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o -c /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/CodeGen/LLVMTargetMachine.cpp
  clang++: /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/IR/Type.cpp:688: static llvm::FixedVectorType *llvm::FixedVectorType::get(llvm::Type *, unsigned int): Assertion `isValidElementType(ElementType) && "Element type of a VectorType must " "be an integer, floating point, or " "pointer type."' failed.
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.	Program arguments: /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/CodeGen -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/CodeGen -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/include -I/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include -nostdinc++ -isystem /b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/include -isystem /b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/include/c++/v1 -fsanitize=memory -fsanitize-memory-use-after-dtor -fsanitize-memory-param-retval -Oz -mllvm -sanitizer-early-opt-ep -Wl,--rpath=/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/lib -L/b/sanitizer-x86_64-linux-bootstrap-msan/build/libcxx_build_msan/lib -w -stdlib=libc++ -fPIC -fno-semantic-interposition -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-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LLVMTargetMachine.cpp.o -c /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/CodeGen/LLVMTargetMachine.cpp
  1.	<eof> parser at end of file
  2.	Optimizer
   #0 0x0000558f40a8a9f3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x72919f3)
   #1 0x0000558f40a889ce llvm::sys::RunSignalHandlers() (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x728f9ce)
   #2 0x0000558f409f216e (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
   #3 0x0000558f409f23c0 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
   #4 0x00007f31965f6520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
   #5 0x00007f319664aa7c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x96a7c)
   #6 0x00007f31965f6476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
   #7 0x00007f31965dc7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
   #8 0x00007f31965dc71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
   #9 0x00007f31965ede96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
  #10 0x0000558f4031d348 llvm::FixedVectorType::get(llvm::Type*, unsigned int) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x6b24348)
  #11 0x0000558f40cea9ff llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(llvm::Value*, llvm::Value*, llvm::Instruction*, llvm::Instruction*, llvm::ArrayRef<llvm::Value*>) const SLPVectorizer.cpp:0:0
  #12 0x0000558f40ce9c40 llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(llvm::Value*, llvm::Value*, llvm::Instruction*, llvm::Instruction*, int, llvm::ArrayRef<llvm::Value*>) const SLPVectorizer.cpp:0:0
  #13 0x0000558f40ce9fbd llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(llvm::Value*, llvm::Value*, llvm::Instruction*, llvm::Instruction*, int, llvm::ArrayRef<llvm::Value*>) const SLPVectorizer.cpp:0:0
  #14 0x0000558f40ce9404 llvm::slpvectorizer::BoUpSLP::VLOperands::getLookAheadScore(llvm::Value*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, int, unsigned int, unsigned int, bool&) SLPVectorizer.cpp:0:0
  #15 0x0000558f40ce8200 llvm::slpvectorizer::BoUpSLP::VLOperands::getBestOperand(unsigned int, int, int, llvm::ArrayRef<llvm::slpvectorizer::BoUpSLP::VLOperands::ReorderingMode>, llvm::ArrayRef<llvm::Value*>) SLPVectorizer.cpp:0:0
  #16 0x0000558f40cc2843 llvm::slpvectorizer::BoUpSLP::VLOperands::reorder() SLPVectorizer.cpp:0:0
  #17 0x0000558f40cb5118 llvm::slpvectorizer::BoUpSLP::reorderInputsAccordingToOpcode(llvm::ArrayRef<llvm::Value*>, llvm::SmallVectorImpl<llvm::Value*>&, llvm::SmallVectorImpl<llvm::Value*>&, llvm::TargetLibraryInfo const&, llvm::DataLayout const&, llvm::ScalarEvolution&, llvm::slpvectorizer::BoUpSLP const&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74bc118)
  #18 0x0000558f40cab0bd llvm::slpvectorizer::BoUpSLP::buildTree_rec(llvm::ArrayRef<llvm::Value*>, unsigned int, llvm::slpvectorizer::BoUpSLP::EdgeInfo const&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74b20bd)
  #19 0x0000558f40cae733 llvm::slpvectorizer::BoUpSLP::buildTree(llvm::ArrayRef<llvm::Value*>) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74b5733)
  #20 0x0000558f40cdcb95 llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74e3b95)
  #21 0x0000558f40ce2d59 bool tryToVectorizeSequence<llvm::Value>(llvm::SmallVectorImpl<llvm::Value*>&, llvm::function_ref<unsigned int (llvm::Value*)>, llvm::function_ref<bool (llvm::Value*, llvm::Value*)>, llvm::function_ref<bool (llvm::Value*, llvm::Value*)>, llvm::function_ref<bool (llvm::ArrayRef<llvm::Value*>, bool)>, bool) SLPVectorizer.cpp:0:0
  #22 0x0000558f40ce2661 llvm::SLPVectorizerPass::vectorizeSimpleInstructions(llvm::SmallSetVector<llvm::Instruction*, 8u>&, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, bool) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74e9661)
  #23 0x0000558f40cd7db2 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74dedb2)
  #24 0x0000558f40cd57cc llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74dc7cc)
  #25 0x0000558f40cd4c87 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x74dbc87)
  #26 0x0000558f41e4a95d llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
  #27 0x0000558f40307ee5 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x6b0eee5)
  #28 0x0000558f3e93e9dd llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) AMDGPUTargetMachine.cpp:0:0
  #29 0x0000558f4030bd7c llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x6b12d7c)
  #30 0x0000558f3e93e78d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) AMDGPUTargetMachine.cpp:0:0
  #31 0x0000558f403070a5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x6b0e0a5)
  #32 0x0000558f4132b596 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) BackendUtil.cpp:0:0
  #33 0x0000558f41323b0d clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7b2ab0d)
  #34 0x0000558f4178a959 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) CodeGenAction.cpp:0:0
  #35 0x0000558f42a1e25f clang::ParseAST(clang::Sema&, bool, bool) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x922525f)
  #36 0x0000558f416a6f30 clang::FrontendAction::Execute() (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7eadf30)
  #37 0x0000558f4161477f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7e1b77f)
  #38 0x0000558f41783ce3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7f8ace3)
  #39 0x0000558f3e5ef3b2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x4df63b2)
  #40 0x0000558f3e5ecf52 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
  #41 0x0000558f4148c4c2 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_1>(long) Job.cpp:0:0
  #42 0x0000558f409f1fe9 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x71f8fe9)
  #43 0x0000558f4148bd20 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7c92d20)
  #44 0x0000558f4144f27e clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7c5627e)
  #45 0x0000558f4144f52e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7c5652e)
  #46 0x0000558f4146c4a0 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x7c734a0)
  #47 0x0000558f3e5ec5ad clang_main(int, char**) (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x4df35ad)
  #48 0x00007f31965ddd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
  #49 0x00007f31965dde40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
  #50 0x0000558f3e5e9a65 _start (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin/clang+++0x4df0a65)
  clang-16: error: clang frontend command failed with exit code 134 (use -v to see invocation)
  clang version 16.0.0 (https://github.com/llvm/llvm-project.git 7841f557ea3df1987ceb1c033e458790f5828795)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix
  InstalledDir: /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build0/bin
  clang-16: note: diagnostic msg: 
  ********************
  PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
  Preprocessed source(s) and associated run script(s) are located at:
  clang-16: note: diagnostic msg: /tmp/LLVMTargetMachine-972989.cpp
  clang-16: note: diagnostic msg: /tmp/LLVMTargetMachine-972989.sh
  clang-16: note: diagnostic msg: 
  *******************


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127531



More information about the llvm-commits mailing list