[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 08:49:01 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `llvm` at step 7 "Add check check-offload".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/8082

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 7 (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-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp    -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib  -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/api/ompx_sync.cpp -o /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/api/Output/ompx_sync.cpp.tmp /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a && /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/api/Output/ompx_sync.cpp.tmp | /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/api/ompx_sync.cpp
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/api/ompx_sync.cpp -o /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/api/Output/ompx_sync.cpp.tmp /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a
# .---command stderr------------
# | already visited expression
# | UNREACHABLE executed at /home/ompworker/bbot/openmp-offload-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-amdgpu-runtime/llvm.build/bin/ld.lld --no-undefined -shared --no-undefined /tmp/lit-tmp-u0hn8a4i/ompx_sync-cbe791-amdgcn-amd-amdhsa-gfx908-65c343.o /tmp/lit-tmp-u0hn8a4i/devicertl-amdgpu-gfx908-amdgcn-amd-amdhsa-gfx908-5259dc.o -plugin-opt=mcpu=gfx908 -plugin-opt=O2 --lto-CGO2 -o /tmp/lit-tmp-u0hn8a4i/ompx_sync.cpp.tmp.amdgcn.gfx908-c90456.img
# | 1.	Running pass 'CallGraph Pass Manager' on module 'ld-temp.o'.
# | 2.	Running pass 'AMDGPU Assembly Printer' on function '@__omp_offloading_802_b38825f__Z3fooi_l10_omp_outlined'
# |  #0 0x000055cc0efdb35f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x83835f)
# |  #1 0x000055cc0efd8894 SignalHandler(int) Signals.cpp:0:0
# |  #2 0x00007fa258469420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
# |  #3 0x00007fa257f3600b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
# |  #4 0x00007fa257f15859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
# |  #5 0x000055cc0ef6e50e (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x7cb50e)
# |  #6 0x000055cc0f94f512 foundRecursiveSymbolDef(llvm::MCSymbol*, llvm::MCExpr const*) AMDGPUMCResourceInfo.cpp:0:0
# |  #7 0x000055cc0f94fe0b 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-amdgpu-runtime/llvm.build/bin/ld.lld+0x11ace0b)
# |  #8 0x000055cc0f950308 llvm::MCResourceInfo::gatherResourceInfo(llvm::MachineFunction const&, llvm::AMDGPUResourceUsageAnalysis::SIFunctionResourceInfo const&, llvm::MCContext&) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x11ad308)
# |  #9 0x000055cc0f941401 llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x119e401)
# | #10 0x000055cc1087cfe5 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
# | #11 0x000055cc125a0d28 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x3dfdd28)
# | #12 0x000055cc11bcb1e2 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) CallGraphSCCPass.cpp:0:0
# | #13 0x000055cc125a1a17 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x3dfea17)
# | #14 0x000055cc1056846d 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 0x000055cc10569cfd 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-amdgpu-runtime/llvm.build/bin/ld.lld+0x1dc6cfd)
# | #16 0x000055cc1055a607 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-amdgpu-runtime/llvm.build/bin/ld.lld+0x1db7607)
# | #17 0x000055cc1055e8b9 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-amdgpu-runtime/llvm.build/bin/ld.lld+0x1dbb8b9)
# | #18 0x000055cc0f1bdb5f lld::elf::BitcodeCompiler::compile() (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0xa1ab5f)
# | #19 0x000055cc0f117f47 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x974f47)
# | #20 0x000055cc0f136917 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x993917)
# | #21 0x000055cc0f13c763 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x999763)
# | #22 0x000055cc0f13cdba lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x999dba)
# | #23 0x000055cc0f015120 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x872120)
# | #24 0x000055cc0ef47f56 lld_main(int, char**, llvm::ToolContext const&) (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x7a4f56)
# | #25 0x000055cc0ee859eb main (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x6e29eb)
# | #26 0x00007fa257f17083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
# | #27 0x000055cc0ef4788e _start (/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/ld.lld+0x7a488e)
# | 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-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