[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 15:30:07 PDT 2024


sbc100 wrote:

This change seems to causing the auto-roller for emscripten to fail due to a crash in LTO.  See https://ci.chromium.org/ui/p/emscripten-releases/builders/luci.emscripten-releases.ci/linux-test-suites

```
PromoteIntegerOperand Op #3: t22: i32,ch = llvm.coro.subfn.addr t26, TargetConstant:i32<54>, t9, Constant:i8<0>

LLVM ERROR: Do not know how to promote this operator's operand!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /usr/local/google/home/sbc/dev/wasm/llvm-build/bin/wasm-ld -o test_val.wasm /tmp/emscripten_temp_54ryesgk/test_val_0.o -lembind-rtti -L/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/lto -lGL-getprocaddr -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpgksompwplibemscripten_js_symbols.so --strip-debug -u__cxa_atexit --export=_emscripten_stack_alloc --export=__getTypeName --export=__get_temp_ret --export=__set_temp_ret --export=__wasm_call_ctors --export=emscripten_stack_get_current --export=_emscripten_stack_restore --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-table -z stack-size=65536 --no-growable-memory --initial-heap=16777216 --no-entry --table-base=1 --global-base=1024
1.	Running pass 'Function Pass Manager' on module 'ld-temp.o'.
2.	Running pass 'WebAssembly Instruction Selection' on function '@_emval_coro_resume'
 #0 0x00007f187817e048 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.19.0git+0x17e048)
 #1 0x00007f187817bcbe llvm::sys::RunSignalHandlers() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.19.0git+0x17bcbe)
 #2 0x00007f187817e70d SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f1877d7b510 (/lib/x86_64-linux-gnu/libc.so.6+0x3c510)
 #4 0x00007f1877dc916c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007f1877d7b472 raise ./signal/../sysdeps/posix/raise.c:27:6
 #6 0x00007f1877d654b2 abort ./stdlib/abort.c:81:7
 #7 0x00007f18780d497a llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.19.0git+0xd497a)
 #8 0x00007f18780d47c6 (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.19.0git+0xd47c6)
 #9 0x00007f18749713e3 (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/../lib/libLLVMSelectionDAG.so.19.0git+0x1713e3)
#10 0x00007f187498ff79 llvm::DAGTypeLegalizer::run() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/../lib/libLLVMSelectionDAG.so.19.0git+0x18ff79)
#11 0x00007f18749953f7 llvm::SelectionDAG::LegalizeTypes() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/../lib/libLLVMSelectionDAG.so.19.0git+0x1953f7)
#12 0x00007f1874acba4f llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/../lib/libLLVMSelectionDAG.so.19.0git+0x2cba4f)
#13 0x00007f1874aca101 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/../lib/libLLVMSelectionDAG.so.19.0git+0x2ca101)
#14 0x00007f1874ac6a63 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/../lib/libLLVMSelectionDAG.so.19.0git+0x2c6a63)
#15 0x00007f1875359b94 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMCodeGen.so.19.0git+0x359b94)
#16 0x00007f1875e97a1a llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMCore.so.19.0git+0x297a1a)
#17 0x00007f1875e9fe22 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMCore.so.19.0git+0x29fe22)
#18 0x00007f1875e9850f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMCore.so.19.0git+0x29850f)
#19 0x00007f1877c24c62 codegen(llvm::lto::Config const&, llvm::TargetMachine*, std::__2::function<llvm::Expected<std::__2::unique_ptr<llvm::CachedFileStream, std::__2::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex const&) LTOBackend.cpp:0:0
#20 0x00007f1877c23daf llvm::lto::backend(llvm::lto::Config const&, std::__2::function<llvm::Expected<std::__2::unique_ptr<llvm::CachedFileStream, std::__2::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMLTO.so.19.0git+0x35daf)
#21 0x00007f1877c1180c llvm::lto::LTO::runRegularLTO(std::__2::function<llvm::Expected<std::__2::unique_ptr<llvm::CachedFileStream, std::__2::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMLTO.so.19.0git+0x2380c)
#22 0x00007f1877c10c49 llvm::lto::LTO::run(std::__2::function<llvm::Expected<std::__2::unique_ptr<llvm::CachedFileStream, std::__2::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::__2::function<llvm::Expected<std::__2::function<llvm::Expected<std::__2::unique_ptr<llvm::CachedFileStream, std::__2::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMLTO.so.19.0git+0x22c49)
#23 0x00007f1878598575 lld::wasm::BitcodeCompiler::compile() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/liblldWasm.so.19.0git+0x36575)
#24 0x00007f18785a286a lld::wasm::SymbolTable::compileBitcodeFiles() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/liblldWasm.so.19.0git+0x4086a)
#25 0x00007f187857dd0c lld::wasm::(anonymous namespace)::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) Driver.cpp:0:0
#26 0x00007f187857ae03 lld::wasm::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/liblldWasm.so.19.0git+0x18e03)
#27 0x00007f1878918a22 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/liblldCommon.so.19.0git+0xca22)
#28 0x000055d414e4e6c3 lld_main(int, char**, llvm::ToolContext const&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/wasm-ld+0x26c3)
#29 0x000055d414e4ead7 main (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/wasm-ld+0x2ad7)
#30 0x00007f1877d666ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#31 0x00007f1877d66785 call_init ./csu/../csu/libc-start.c:128:20
#32 0x00007f1877d66785 __libc_start_main ./csu/../csu/libc-start.c:347:5
#33 0x000055d414e4e29a _start (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/wasm-ld+0x229a)
```

https://github.com/llvm/llvm-project/pull/90310


More information about the llvm-commits mailing list