[flang-commits] [flang] [mlir] [flang][OpenMP] Skip runtime mapping with no offload targets (PR #144534)

antoine moynault via flang-commits flang-commits at lists.llvm.org
Mon Jun 23 00:44:00 PDT 2025


antmox wrote:

Hi @kparzysz,

Could this be the cause of these buildbot failures ?

- https://lab.llvm.org/buildbot/#/builders/199/builds/4192
- https://lab.llvm.org/buildbot/#/builders/198/builds/5458
- https://lab.llvm.org/buildbot/#/builders/4/builds/7464
- https://lab.llvm.org/buildbot/#/builders/143/builds/8615
- https://lab.llvm.org/buildbot/#/builders/41/builds/7458
- https://lab.llvm.org/buildbot/#/builders/17/builds/8963
- https://lab.llvm.org/buildbot/#/builders/84/builds/2077

>  #0 0x0000c042cabcb9e0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x700b9e0)
>  #1 0x0000c042cabc9894 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x7009894)
>  #2 0x0000c042cabcc0dc SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
>  #3 0x0000f7ce5330a8f8 (linux-vdso.so.1+0x8f8)
>  #4 0x0000f7ce52ccf1f0 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
>  #5 0x0000f7ce52c8a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
>  #6 0x0000f7ce52c77130 abort ./stdlib/abort.c:81:7
>  #7 0x0000f7ce52c83fd4 __assert_fail_base ./assert/assert.c:91:7
>  #8 0x0000f7ce52c8404c (/lib/aarch64-linux-gnu/libc.so.6+0x3404c)
>  #9 0x0000c042cf8e4270 llvm::TargetFolder::FoldGEP(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::GEPNoWrapFlags) const ConstantFolding.cpp:0:0
> #10 0x0000c042c93bd8ec llvm::IRBuilderBase::CreateGEP(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&, llvm::GEPNoWrapFlags) AArch64ISelLowering.cpp:0:0
> #11 0x0000c042ccb537d4 convertOperationImpl(mlir::Operation&, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) LLVMToLLVMIRTranslation.cpp:0:0
> #12 0x0000c042ce32b084 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76b084)
> #13 0x0000c042ce32bba4 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76bba4)
> #14 0x0000c042cc8f0ef0 inlineConvertOmpRegions(mlir::Region&, llvm::StringRef, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&, llvm::SmallVectorImpl<llvm::Value*>*) OpenMPToLLVMIRTranslation.cpp:0:0
> #15 0x0000c042cc8f3788 llvm::Expected<llvm::IRBuilderBase::InsertPoint> llvm::function_ref<llvm::Expected<llvm::IRBuilderBase::InsertPoint> (llvm::IRBuilderBase::InsertPoint, llvm::OpenMPIRBuilder::BodyGenTy)>::callback_fn<convertOmpTargetData(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&)::$_5>(long, llvm::IRBuilderBase::InsertPoint, llvm::OpenMPIRBuilder::BodyGenTy) OpenMPToLLVMIRTranslation.cpp:0:0
> #16 0x0000c042cf213350 llvm::OpenMPIRBuilder::createTargetData(llvm::OpenMPIRBuilder::LocationDescription const&, llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value*, llvm::Value*, llvm::OpenMPIRBuilder::TargetDataInfo&, llvm::function_ref<llvm::OpenMPIRBuilder::MapInfosTy& (llvm::IRBuilderBase::InsertPoint)>, llvm::function_ref<llvm::Expected<llvm::Function*> (unsigned int)>, llvm::omp::RuntimeFunction*, llvm::function_ref<llvm::Expected<llvm::IRBuilderBase::InsertPoint> (llvm::IRBuilderBase::InsertPoint, llvm::OpenMPIRBuilder::BodyGenTy)>, llvm::function_ref<void (unsigned int, llvm::Value*)>, llvm::Value*) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xb653350)
> #17 0x0000c042cc8e168c convertOmpTargetData(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
> #18 0x0000c042cc8db950 convertHostOrTargetOperation(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
> #19 0x0000c042ce32b084 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76b084)
> #20 0x0000c042ce32bba4 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76bba4)
> #21 0x0000c042cc8f0ef0 inlineConvertOmpRegions(mlir::Region&, llvm::StringRef, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&, llvm::SmallVectorImpl<llvm::Value*>*) OpenMPToLLVMIRTranslation.cpp:0:0
> #22 0x0000c042cc8f3788 llvm::Expected<llvm::IRBuilderBase::InsertPoint> llvm::function_ref<llvm::Expected<llvm::IRBuilderBase::InsertPoint> (llvm::IRBuilderBase::InsertPoint, llvm::OpenMPIRBuilder::BodyGenTy)>::callback_fn<convertOmpTargetData(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&)::$_5>(long, llvm::IRBuilderBase::InsertPoint, llvm::OpenMPIRBuilder::BodyGenTy) OpenMPToLLVMIRTranslation.cpp:0:0
> #23 0x0000c042cf213350 llvm::OpenMPIRBuilder::createTargetData(llvm::OpenMPIRBuilder::LocationDescription const&, llvm::IRBuilderBase::InsertPoint, llvm::IRBuilderBase::InsertPoint, llvm::Value*, llvm::Value*, llvm::OpenMPIRBuilder::TargetDataInfo&, llvm::function_ref<llvm::OpenMPIRBuilder::MapInfosTy& (llvm::IRBuilderBase::InsertPoint)>, llvm::function_ref<llvm::Expected<llvm::Function*> (unsigned int)>, llvm::omp::RuntimeFunction*, llvm::function_ref<llvm::Expected<llvm::IRBuilderBase::InsertPoint> (llvm::IRBuilderBase::InsertPoint, llvm::OpenMPIRBuilder::BodyGenTy)>, llvm::function_ref<void (unsigned int, llvm::Value*)>, llvm::Value*) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xb653350)
> #24 0x0000c042cc8e168c convertOmpTargetData(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
> #25 0x0000c042cc8db950 convertHostOrTargetOperation(mlir::Operation*, llvm::IRBuilderBase&, mlir::LLVM::ModuleTranslation&) OpenMPToLLVMIRTranslation.cpp:0:0
> #26 0x0000c042ce32b084 mlir::LLVM::ModuleTranslation::convertOperation(mlir::Operation&, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76b084)
> #27 0x0000c042ce32bba4 mlir::LLVM::ModuleTranslation::convertBlockImpl(mlir::Block&, bool, llvm::IRBuilderBase&, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76bba4)
> #28 0x0000c042ce32fd38 mlir::LLVM::ModuleTranslation::convertOneFunction(mlir::LLVM::LLVMFuncOp) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa76fd38)
> #29 0x0000c042ce332288 mlir::LLVM::ModuleTranslation::convertFunctions() (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa772288)
> #30 0x0000c042ce334e90 mlir::translateModuleToLLVMIR(mlir::Operation*, llvm::LLVMContext&, llvm::StringRef, bool) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0xa774e90)
> #31 0x0000c042cac1b728 Fortran::frontend::CodeGenAction::generateLLVMIR() (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x705b728)
> #32 0x0000c042cac1f094 Fortran::frontend::CodeGenAction::executeAction() (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x705f094)
> #33 0x0000c042cac1223c Fortran::frontend::FrontendAction::execute() (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x705223c)
> #34 0x0000c042cabfc914 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x703c914)
> #35 0x0000c042cac16830 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x7056830)
> #36 0x0000c042c930dea8 fc1_main(llvm::ArrayRef<char const*>, char const*) (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x574dea8)
> #37 0x0000c042c930cd38 main (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x574cd38)
> #38 0x0000f7ce52c773fc __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
> #39 0x0000f7ce52c774cc call_init ./csu/../csu/libc-start.c:128:20
> #40 0x0000f7ce52c774cc __libc_start_main ./csu/../csu/libc-start.c:379:5
> #41 0x0000c042c930bdf0 _start (/home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1.install/bin/flang+0x574bdf0)

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


More information about the flang-commits mailing list