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

2025-04-21 Thread Erich Keane via cfe-commits
@@ -109,14 +126,15 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +lastDeviceTypeClause = &clause; if constexpr (isOneOfTypes) { llvm::SmallVector deviceTypes; std::optional existingDevice

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

2025-04-21 Thread Erich Keane via cfe-commits
@@ -109,14 +126,15 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +lastDeviceTypeClause = &clause; erichkeane wrote: Its owned by the AST, so its lifetime lasts until the AST is destroyed,

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

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -109,14 +126,15 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +lastDeviceTypeClause = &clause; if constexpr (isOneOfTypes) { llvm::SmallVector deviceTypes; std::optional existingDevice

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

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -109,14 +126,15 @@ class OpenACCClauseCIREmitter final } void VisitDeviceTypeClause(const OpenACCDeviceTypeClause &clause) { +lastDeviceTypeClause = &clause; andykaylor wrote: What's the lifetime of this object? Who owns it? https://github.com/llv

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

2025-04-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. I had one question about something that made me nervous but is probably OK, and a nit that isn't really related to this PR. https://github.com/llvm/llvm-project/pull/136578 ___

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

2025-04-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/136578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/136578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-21 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/136578 >From e12a5016b203446d68019b4f18c19573b481aef7 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 16 Apr 2025 08:33:35 -0700 Subject: [PATCH 1/2] [OpenACC][CIR] Lower 'num_workers' for parallel/kernels Thi

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

2025-04-21 Thread Erich Keane via cfe-commits
@@ -136,6 +154,51 @@ class OpenACCClauseCIREmitter final if (!clause.getArchitectures().empty()) operation.setDeviceType( decodeDeviceType(clause.getArchitectures()[0].getIdentifierInfo())); +} else if constexpr (isOneOfTypes) { + // Nothing

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

2025-04-21 Thread Bruno Cardoso Lopes via cfe-commits
@@ -136,6 +154,51 @@ class OpenACCClauseCIREmitter final if (!clause.getArchitectures().empty()) operation.setDeviceType( decodeDeviceType(clause.getArchitectures()[0].getIdentifierInfo())); +} else if constexpr (isOneOfTypes) { + // Nothing

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

2025-04-21 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/136578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-21 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Minor nit, but LGTM otherwise https://github.com/llvm/llvm-project/pull/136578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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

2025-04-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes This patch also includes the first one to handle 'device_type' properly, which is where most of the 'challenge' here comes from. >From the best I can tell: we must keep two lists of the same size, 1 of a

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

2025-04-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes This patch also includes the first one to handle 'device_type' properly, which is where most of the 'challenge' here comes from. >From the best I can tell: we must keep two lists of the same size, 1 of all

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

2025-04-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/136578 This patch also includes the first one to handle 'device_type' properly, which is where most of the 'challenge' here comes from. >From the best I can tell: we must keep two lists of the same size, 1 of all o