[flang-commits] [flang] [flang][cuda][openacc] Add UseDevice attribute to model host_data use_device symbols (PR #195182)

Zhen Wang via flang-commits flang-commits at lists.llvm.org
Mon May 4 13:56:16 PDT 2026


================
@@ -2930,6 +2930,18 @@ static int GetMatchingDistance(const common::LanguageFeatureControl &features,
       return 0;
     }
   }
+  // UseDevice (OpenACC host_data use_device) has a device address but the
+  // underlying variable is host-resident.  Prefer device dummies, but allow
----------------
wangzpgi wrote:

I've rewritten the comment to be more explicit about what UseDevice represents and what each matching-distance value (0/2/3) means.

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


More information about the flang-commits mailing list