[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Valentin Clement Message-ID: In-Reply-To: https://github.com/vzakhari approved this pull request. Thank you, Valentin! https://github.com/llvm/llvm-project/pull/94771 ___ llvm-branch-commits mailing

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?= Message-ID: In-Reply-To: @@ -540,9 +606,31 @@ struct ForcedReduceComplex16 { auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8)); auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); auto

[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic with DIM argument (PR #94771)

2024-06-07 Thread Slava Zakharin via llvm-branch-commits
@@ -527,10 +571,32 @@ struct ForcedReduceComplex10 { } }; +/// Placeholder for Dim complex(10) version of Reduce Intrinsic +struct ForcedReduceComplex10Dim { + static constexpr const char *name = + ExpandAndQuoteKey(RTNAME(CppReduceComplex10Dim)); + static constexpr

[llvm-branch-commits] [flang] [flang][cuda] Lower device/managed/unified allocation to cuda ops (PR #90526)

2024-04-29 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari approved this pull request. https://github.com/llvm/llvm-project/pull/90526 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][cuda] Lower device/managed/unified allocation to cuda ops (PR #90526)

2024-04-29 Thread Slava Zakharin via llvm-branch-commits
vzakhari wrote: Thank you, Valentin! Is it expected that we can have a mix of `fir.alloca` and `fir.cuda_alloc` operations in the device routines (e.g. I suppose `fir::FirOpBuilder::createTemporaryAlloc` can generate `fir.alloca` for a temporary location in device code)? It is not

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-21 Thread Slava Zakharin via llvm-branch-commits
vzakhari wrote: Will use alternative solution. https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-21 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari closed https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-21 Thread Slava Zakharin via llvm-branch-commits
vzakhari wrote: Will use alternative solution. https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-21 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari closed https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-21 Thread Slava Zakharin via llvm-branch-commits
vzakhari wrote: Will use alternative solution. https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-21 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari closed https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85180 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85180 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85180 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85180 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added Fortran::common::reference_wrapper for use on device. (PR #85178)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85178 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added Fortran::common::reference_wrapper for use on device. (PR #85178)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85178 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85181 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85180 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85180 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added Fortran::common::reference_wrapper for use on device. (PR #85178)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85178 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added Fortran::common::reference_wrapper for use on device. (PR #85178)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85178 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-15 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari updated https://github.com/llvm/llvm-project/pull/85179 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-14 Thread Slava Zakharin via llvm-branch-commits
vzakhari wrote: > It would be better to have the types that are available on the device declare > themselves so in their declarations via a member or (better) inherited trait. Like this. I will add the type trait for those types that are available on the device. > The big variant union in

[llvm-branch-commits] [flang][runtime] Enable PRINT of integer32 for device. (PR #85182)

2024-03-13 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/85182 Use InternalUnit with own buffer to accumulate output and print it at the end of the statement. Some code was disabled with RT_DEVICE_COMPILATION checks. It can be enabled later.

[llvm-branch-commits] [flang][runtime] Added self-printing for InternalUnit. (PR #85181)

2024-03-13 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/85181 An InternalUnit might be constructed to allocate its own "output" buffer of a predefined size. The buffer is then used for collecting all the output, and it printed by std::printf at the end of the statement.

[llvm-branch-commits] [NFC][flang] Reorder const and RT_API_ATTRS. (PR #85180)

2024-03-13 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/85180 Clean-up to keep the type qualifier next to the type. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [flang][runtime] Added custom visitor for IoStatementState variants. (PR #85179)

2024-03-13 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/85179 The visitor only allows Internal.*IoStatementState variants to be visited. In case another variant is met a runtime error is produced. During the device compilation the other variants' classes are not

[llvm-branch-commits] [flang][runtime] Added Fortran::common::reference_wrapper for use on device. (PR #85178)

2024-03-13 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/85178 This is a simplified implementation of std::reference_wrapper that can be used in the offload builds for the device code. The methods are properly marked with RT_API_ATTRS so that the device compilation

[llvm-branch-commits] [flang] [flang][TBAABuilder] not all loads and stores are inside of functions (PR #84305)

2024-03-07 Thread Slava Zakharin via llvm-branch-commits
https://github.com/vzakhari approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84305 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits