[flang] [llvm] [flang][OpenMP] Avoid early returns, NFC (PR #117231)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 23:39:12 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `flang` at step 6 "build-unified-tree".

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

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

```
Step 6 (build-unified-tree) failure: build (failure)
...
-- Compiler features available: builtin_fmax_fmin;fixed_point;float128;float16
-- Using getrandom for hashtable randomness
-- Compiler-RT supported architectures: x86_64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;hwasan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;hwasan;msan;tsan;ubsan"
-- check-shadowcallstack does nothing.
-- Configuring done
-- Generating done
-- Build files have been written to: /build/buildbot/premerge-monolithic-linux/build/runtimes/runtimes-bins
54.721 [54/22/3230] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/ReductionProcessor.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/ReductionProcessor.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/buildbot/premerge-monolithic-linux/build/tools/flang/lib/Lower -I/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower -I/build/buildbot/premerge-monolithic-linux/llvm-project/flang/include -I/build/buildbot/premerge-monolithic-linux/build/tools/flang/include -I/build/buildbot/premerge-monolithic-linux/build/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include -isystem /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/../mlir/include -isystem /build/buildbot/premerge-monolithic-linux/build/tools/mlir/include -isystem /build/buildbot/premerge-monolithic-linux/build/tools/clang/include -isystem /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/../clang/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/ReductionProcessor.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/ReductionProcessor.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/ReductionProcessor.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/ReductionProcessor.cpp:13:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/ReductionProcessor.h:16:
/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.h:169:25: error: template parameter redefines default argument
    typename ResultTy = std::invoke_result_t<FuncTy, typename ArgTy::Value>>
                        ^
/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.h:159:25: note: previous default template argument defined here
    typename ResultTy = std::invoke_result_t<FuncTy, typename ArgTy::Value>>
                        ^
/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.h:170:25: error: redefinition of 'maybeApplyToV'
std::optional<ResultTy> maybeApplyToV(FuncTy &&func, const ArgTy *arg) {
                        ^
/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.h:160:25: note: previous definition is here
std::optional<ResultTy> maybeApplyToV(FuncTy &&func, const ArgTy *arg) {
                        ^
2 errors generated.
54.798 [54/20/3232] Generating builtins.link.pre-deps.cedar-r600--.bc
warning: Linking two modules of different data layouts: '/build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/cedar-r600--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

warning: Linking two modules of different data layouts: '/build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/cedar-r600--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

55.147 [54/17/3235] Generating builtins.link.pre-deps.nvptx64--nvidiacl.bc
warning: Linking two modules of different data layouts: '/build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/nvptx64--nvidiacl/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-i64:64-i128:128-v16:16-v32:32-n16:32:64'

warning: Linking two modules of different data layouts: '/build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/nvptx64--nvidiacl/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-i64:64-i128:128-v16:16-v32:32-n16:32:64'

55.436 [54/16/3236] Generating builtins.link.pre-deps.cayman-r600--.bc
warning: Linking two modules of different data layouts: '/build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/cayman-r600--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

warning: Linking two modules of different data layouts: '/build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/cayman-r600--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

56.623 [54/15/3237] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/buildbot/premerge-monolithic-linux/build/tools/flang/lib/Lower -I/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower -I/build/buildbot/premerge-monolithic-linux/llvm-project/flang/include -I/build/buildbot/premerge-monolithic-linux/build/tools/flang/include -I/build/buildbot/premerge-monolithic-linux/build/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include -isystem /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/../mlir/include -isystem /build/buildbot/premerge-monolithic-linux/build/tools/mlir/include -isystem /build/buildbot/premerge-monolithic-linux/build/tools/clang/include -isystem /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/../clang/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.cpp
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.cpp:9:
/build/buildbot/premerge-monolithic-linux/llvm-project/flang/lib/Lower/OpenMP/Clauses.h:169:25: error: template parameter redefines default argument
    typename ResultTy = std::invoke_result_t<FuncTy, typename ArgTy::Value>>
                        ^

```

</details>

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


More information about the llvm-commits mailing list