[llvm] [AMDGPU] Avoid resource propagation for recursion through multiple functions (PR #111004)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 09:01:05 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `llvm` at step 10 "Add check check-offload".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/6942
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 10 (Add check check-offload) failure: test (failure)
******************** TEST 'libomptarget :: amdgcn-amd-amdhsa :: api/ompx_sync.cpp' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/api/ompx_sync.cpp -o /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/api/Output/ompx_sync.cpp.tmp -Xoffload-linker -lc -Xoffload-linker -lm /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a && /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/api/Output/ompx_sync.cpp.tmp | /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/api/ompx_sync.cpp
# executed command: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/offload/test/api/ompx_sync.cpp -o /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/api/Output/ompx_sync.cpp.tmp -Xoffload-linker -lc -Xoffload-linker -lm /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a
# .---command stderr------------
# | already visited expression
# | UNREACHABLE executed at /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp:103!
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0. Program arguments: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld --no-undefined -shared -L/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/../lib/amdgcn-amd-amdhsa --no-undefined /tmp/lit-tmp-mibgyqy2/ompx_sync-ff272d-amdgcn-amd-amdhsa-gfx906-dce7f1.o /tmp/lit-tmp-mibgyqy2/devicertl-amdgpu-gfx906-amdgcn-amd-amdhsa-gfx906-1fca15.o -lc -lm -plugin-opt=mcpu=gfx906 -plugin-opt=O2 --lto-CGO2 -o /tmp/lit-tmp-mibgyqy2/ompx_sync.cpp.tmp.amdgcn.gfx906-654961.img
# | 1. Running pass 'CallGraph Pass Manager' on module 'ld-temp.o'.
# | 2. Running pass 'AMDGPU Assembly Printer' on function '@__omp_offloading_802_d8282a8__Z3fooi_l10_omp_outlined'
# | #0 0x00005614bad2f57f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x83857f)
# | #1 0x00005614bad2cab4 SignalHandler(int) Signals.cpp:0:0
# | #2 0x00007f2f57e36420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
# | #3 0x00007f2f5774900b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
# | #4 0x00007f2f57728859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
# | #5 0x00005614bacc272e (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x7cb72e)
# | #6 0x00005614bb6a6082 foundRecursiveSymbolDef(llvm::MCSymbol*, llvm::MCExpr const*) AMDGPUMCResourceInfo.cpp:0:0
# | #7 0x00005614bb6a697b llvm::MCResourceInfo::assignResourceInfoExpr(long, llvm::MCResourceInfo::ResourceInfoKind, llvm::AMDGPUMCExpr::VariantKind, llvm::MachineFunction const&, llvm::SmallVectorImpl<llvm::Function const*> const&, llvm::MCContext&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x11af97b)
# | #8 0x00005614bb6a6e78 llvm::MCResourceInfo::gatherResourceInfo(llvm::MachineFunction const&, llvm::AMDGPUResourceUsageAnalysis::SIFunctionResourceInfo const&, llvm::MCContext&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x11afe78)
# | #9 0x00005614bb697f71 llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x11a0f71)
# | #10 0x00005614bc5d3b55 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
# | #11 0x00005614be2f7898 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x3e00898)
# | #12 0x00005614bd921d52 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) CallGraphSCCPass.cpp:0:0
# | #13 0x00005614be2f8587 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x3e01587)
# | #14 0x00005614bc2befdd codegen(llvm::lto::Config const&, llvm::TargetMachine*, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex const&) LTOBackend.cpp:0:0
# | #15 0x00005614bc2c086d llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x1dc986d)
# | #16 0x00005614bc2b1177 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x1dba177)
# | #17 0x00005614bc2b5429 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::FileCache) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x1dbe429)
# | #18 0x00005614baf11d7f lld::elf::BitcodeCompiler::compile() (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0xa1ad7f)
# | #19 0x00005614bae6c167 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x975167)
# | #20 0x00005614bae8ab37 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x993b37)
# | #21 0x00005614bae90983 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x999983)
# | #22 0x00005614bae90fda lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x999fda)
# | #23 0x00005614bad69340 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x872340)
# | #24 0x00005614bac9c176 lld_main(int, char**, llvm::ToolContext const&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x7a5176)
# | #25 0x00005614babd9c0b main (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x6e2c0b)
# | #26 0x00007f2f5772a083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
# | #27 0x00005614bac9baae _start (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/ld.lld+0x7a4aae)
# | clang: error: unable to execute command: Aborted (core dumped)
# | clang: error: ld.lld command failed due to signal (use -v to see invocation)
# | /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang-linker-wrapper: error: 'clang' failed
# | clang++: error: linker command failed with exit code 1 (use -v to see invocation)
# `-----------------------------
# error: command failed with exit status: 1
...
```
</details>
https://github.com/llvm/llvm-project/pull/111004
More information about the llvm-commits
mailing list