Closed Jules-Kong closed 8 months ago
报错信息
************* Building riscv32 libclc object file ************ clang: /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/include/llvm/ADT/SmallVector.h:298: const T& llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::operator[](llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type) const [with T = llvm::DenseSet<unsigned int>; <template-parameter-1-2> = void; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::const_reference = const llvm::DenseSet<unsigned int>&; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type = long unsigned int]: Assertion `idx < size()' 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: /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/install/bin/clang -target riscv32 -mcpu=ventus-gpgpu -cl-std=CL2.0 -Wno-override-module -ffunction-sections -fdata-sections -c /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/libclc/generic/lib/subnormal_helper_func.ll -o /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/build-libclc/subnormal_helper_func.ll.o 1. Code generation 2. Running pass 'Function Pass Manager' on module '/home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/libclc/generic/lib/subnormal_helper_func.ll'. 3. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@__clc_subnormals_disabled' #0 0x00007f2ede717274 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:22 #1 0x00007f2ede71733b PrintStackTraceSignalHandler(void*) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/Unix/Signals.inc:641:1 #2 0x00007f2ede714e80 llvm::sys::RunSignalHandlers() /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/Signals.cpp:104:20 #3 0x00007f2ede716a6d llvm::sys::CleanupOnSignal(unsigned long) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/Unix/Signals.inc:366:31 #4 0x00007f2ede558a4b (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:77:5 #5 0x00007f2ede558fd4 CrashRecoverySignalHandler(int) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:398:1 #6 0x00007f2eddc42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #7 0x00007f2eddc96a7c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76 #8 0x00007f2eddc96a7c __pthread_kill_internal ./nptl/pthread_kill.c:78:10 #9 0x00007f2eddc96a7c pthread_kill ./nptl/pthread_kill.c:89:10 #10 0x00007f2eddc42476 gsignal ./signal/../sysdeps/posix/raise.c:27:6 #11 0x00007f2eddc287f3 abort ./stdlib/abort.c:81:7 #12 0x00007f2eddc2871b _nl_load_domain ./intl/loadmsgcat.c:1177:9 #13 0x00007f2eddc39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96) #14 0x00007f2ee827611a llvm::SmallVectorTemplateCommon<llvm::DenseSet<unsigned int, llvm::DenseMapInfo<unsigned int, void>>, void>::operator[](unsigned long) const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/include/llvm/ADT/SmallVector.h:299:17 #15 0x00007f2ee8274d41 llvm::RISCVSubtarget::getCurrentRegisterAddedSet() const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Target/RISCV/RISCVSubtarget.h:156:3 #16 0x00007f2ee8270213 llvm::RISCVFrameLowering::emitPrologue(llvm::MachineFunction&, llvm::MachineBasicBlock&) const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:318:77 #17 0x00007f2ee59b852b (anonymous namespace)::PEI::insertPrologEpilogCode(llvm::MachineFunction&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp:1171:3 #18 0x00007f2ee59b3ebf (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/CodeGen/PrologEpilogInserter.cpp:266:18 #19 0x00007f2ee57848e2 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:91:33 #20 0x00007f2edfa1ab91 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1430:20 #21 0x00007f2edfa1ae62 llvm::FPPassManager::runOnModule(llvm::Module&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1476:13 #22 0x00007f2edfa1b2cd (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1545:20 #23 0x00007f2edfa15fe6 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:535:13 #24 0x00007f2edfa1bbdd llvm::legacy::PassManager::run(llvm::Module&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1673:1 #25 0x00007f2ee670d09d (anonymous namespace)::EmitAssemblyHelper::RunCodegenPipeline(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>>&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1095:3 #26 0x00007f2ee670d2a0 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1118:17 #27 0x00007f2ee670e331 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>>) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1274:25 #28 0x00007f2ee6efe791 clang::CodeGenAction::ExecuteAction() /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1239:20 #29 0x00007f2ee3d0502a clang::FrontendAction::Execute() /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1059:38 #30 0x00007f2ee3c15b5f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1045:42 #31 0x00007f2ee9b52b95 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:264:38 #32 0x000056266dd29bcb cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/tools/driver/cc1_main.cpp:251:40 #33 0x000056266dd17c32 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/tools/driver/driver.cpp:319:20 #34 0x00007f2ee351829b clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()::operator()() const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Driver/Job.cpp:428:32 #35 0x00007f2ee35188a9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:40 #36 0x00007f2ede5444dc llvm::function_ref<void ()>::operator()() const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:62 #37 0x00007f2ede5591f1 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:434:10 #38 0x00007f2ee35184b7 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Driver/Job.cpp:428:7 #39 0x00007f2ee349bf8d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Driver/Compilation.cpp:200:22 #40 0x00007f2ee349c30e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Driver/Compilation.cpp:254:62 #41 0x00007f2ee34b519f clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/lib/Driver/Driver.cpp:1816:28 #42 0x000056266dd19261 clang_main(int, char**) /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/clang/tools/driver/driver.cpp:520:39 #43 0x000056266dd4c439 main /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/build/tools/clang/tools/driver/clang-driver.cpp:11:63 #44 0x00007f2eddc29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #45 0x00007f2eddc29e40 call_init ./csu/../csu/libc-start.c:128:20 #46 0x00007f2eddc29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #47 0x000056266dd16255 _start (/home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/install/bin/clang+0x11255) clang-16: error: clang frontend command failed with exit code 134 (use -v to see invocation) clang version 16.0.0 (git@github.com:THU-DSP-LAB/llvm-project.git f2517d8bc472efb76a68c73ca915557aa19ce1e1) Target: riscv32 Thread model: posix InstalledDir: /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/install/bin clang-16: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs. ld.lld: error: cannot open /home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/build-libclc/subnormal_helper_func.ll.o: No such file or directory cp: cannot stat '/home/kl/kl_ws/tsinghua_ws/ventus_ws/llvm-project/build-libclc/riscv32clc.o': No such file or directory
构建分支 llvm: terapines-dev 0392670a4 pocl: test_tmp 4554b705e925 driver: main 5ba0eda spike: test_tmp 267c2896 ocl-icd: master fdde667
我们这边有两个解决方案, @wangqinfan 等下会PR合进去 @Jules-Kong
报错信息
构建分支 llvm: terapines-dev 0392670a4 pocl: test_tmp 4554b705e925 driver: main 5ba0eda spike: test_tmp 267c2896 ocl-icd: master fdde667