[flang-commits] [flang] [flang][cuda] Do not lower device variables in main program as globals (PR #102512)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu Aug 8 11:07:48 PDT 2024


================
@@ -1696,7 +1696,8 @@ bool IsSaved(const Symbol &original) {
       (features.IsEnabled(common::LanguageFeature::SaveMainProgram) ||
           (features.IsEnabled(
                common::LanguageFeature::SaveBigMainProgramVariables) &&
-              symbol.size() > 32))) {
+              symbol.size() > 32)) &&
+      !Fortran::evaluate::IsCUDADeviceSymbol(symbol)) {
----------------
vzakhari wrote:

Please allow it for `unified` variables.

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


More information about the flang-commits mailing list