[clang] [OpenACC][CIR] Lower 'num_workers' for parallel/kernels (PR #136578)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 21 12:17:23 PDT 2025


================
@@ -109,14 +126,15 @@ class OpenACCClauseCIREmitter final
   }
 
   void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) {
+    lastDeviceTypeClause = &clause;
     if constexpr (isOneOfTypes<OpTy, InitOp, ShutdownOp>) {
       llvm::SmallVector<mlir::Attribute> deviceTypes;
       std::optional<mlir::ArrayAttr> existingDeviceTypes =
           operation.getDeviceTypes();
 
       // Ensure we keep the existing ones, and in the correct 'new' order.
       if (existingDeviceTypes) {
-        for (const mlir::Attribute &Attr : *existingDeviceTypes)
+        for (mlir::Attribute Attr : *existingDeviceTypes)
----------------
erichkeane wrote:

Fixed here: 4b98955680e0aad33cad0e810f1daaa8bc7c0a23

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


More information about the cfe-commits mailing list