[flang] [libc] [mlir] [llvm] [compiler-rt] [lldb] [clang-tools-extra] [libcxxabi] [libcxx] [clang] [mlir][flang][openacc] Support device_type on loop construct (PR #76892)

2024-01-04 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Looks great to me! Thank you!

https://github.com/llvm/llvm-project/pull/76892
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [flang][openacc] Enable lowering support for OpenACC atomic operations (PR #65776)

2023-09-11 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru updated 
https://github.com/llvm/llvm-project/pull/65776:

>From 967089f4e81d5bfcddeabddf81ab90912b5cc3b3 Mon Sep 17 00:00:00 2001
From: Razvan Lupusoru 
Date: Fri, 8 Sep 2023 09:06:57 -0700
Subject: [PATCH 1/4] [flang][openacc] Enable lowering support for OpenACC
 atomic operations

Since the OpenACC atomics specification is a subset of OpenMP atomics,
the same lowering implementation can be used. This change extracts out
the necessary pieces from the OpenMP lowering and puts them in a shared
spot. The shared spot is a header file so that each implementation can
template specialize directly.

After putting the OpenMP implementation in a common spot, the following
changes were needed to make it work for OpenACC:
* Ensure parsing works correctly by avoiding hardcoded offsets.
* Templatize based on atomic type.
* The checking whether it is OpenMP or OpenACC is done by checking
  for OmpAtomicClauseList (OpenACC does not implement this so we just
  templatize with void). It was preferable to check this instead of
  atomic type because in some cases, like atomic capture, the
  read/write/update implementations are called - and we want compile
  time evaluation of these conditional parts.
* The memory order and hint are used only for OpenMP.
* Generate acc dialect operations instead of omp dialect operations.
---
 flang/lib/Lower/Bridge.cpp|   2 +
 flang/lib/Lower/DirectivesCommon.h| 610 ++
 flang/lib/Lower/OpenACC.cpp   |  34 +-
 flang/lib/Lower/OpenMP.cpp| 523 +--
 .../test/Lower/OpenACC/acc-atomic-capture.f90 |  99 +++
 flang/test/Lower/OpenACC/acc-atomic-read.f90  |  48 ++
 .../Lower/OpenACC/acc-atomic-update-hlfir.f90 |  23 +
 .../test/Lower/OpenACC/acc-atomic-update.f90  |  74 +++
 flang/test/Lower/OpenACC/acc-atomic-write.f90 |  57 ++
 9 files changed, 979 insertions(+), 491 deletions(-)
 create mode 100644 flang/lib/Lower/DirectivesCommon.h
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-capture.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-read.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-update-hlfir.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-update.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-write.f90

diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 75784f4e5a72be2..cbe108194dd212f 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -2287,9 +2287,11 @@ class FirConverter : public 
Fortran::lower::AbstractConverter {
 
   void genFIR(const Fortran::parser::OpenACCConstruct &acc) {
 mlir::OpBuilder::InsertPoint insertPt = builder->saveInsertionPoint();
+localSymbols.pushScope();
 genOpenACCConstruct(*this, bridge.getSemanticsContext(), getEval(), acc);
 for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations())
   genFIR(e);
+localSymbols.popScope();
 builder->restoreInsertionPoint(insertPt);
   }
 
diff --git a/flang/lib/Lower/DirectivesCommon.h 
b/flang/lib/Lower/DirectivesCommon.h
new file mode 100644
index 000..7177576e039a219
--- /dev/null
+++ b/flang/lib/Lower/DirectivesCommon.h
@@ -0,0 +1,610 @@
+//===-- Lower/DirectivesCommon.h *- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
+//
+//===--===//
+///
+/// A location to place directive utilities shared across multiple lowering
+/// files, e.g. utilities shared in OpenMP and OpenACC. The header file can
+/// be used for both declarations and templated/inline implementations.
+//===--===//
+
+#ifndef FORTRAN_LOWER_DIRECTIVES_COMMON_H
+#define FORTRAN_LOWER_DIRECTIVES_COMMON_H
+
+#include "flang/Common/idioms.h"
+#include "flang/Lower/Bridge.h"
+#include "flang/Lower/ConvertExpr.h"
+#include "flang/Lower/ConvertVariable.h"
+#include "flang/Lower/OpenACC.h"
+#include "flang/Lower/OpenMP.h"
+#include "flang/Lower/PFTBuilder.h"
+#include "flang/Lower/StatementContext.h"
+#include "flang/Optimizer/Builder/BoxValue.h"
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Builder/Todo.h"
+#include "flang/Optimizer/HLFIR/HLFIROps.h"
+#include "flang/Parser/parse-tree.h"
+#include "flang/Semantics/openmp-directive-sets.h"
+#include "flang/Semantics/tools.h"
+#include "mlir/Dialect/OpenACC/OpenACC.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/Dialect/SCF/IR/SCF.h"
+#include "llvm/Frontend/OpenMP/OMPConstants.h"
+#inc

[clang-tools-extra] [flang][openacc] Enable lowering support for OpenACC atomic operations (PR #65776)

2023-09-11 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru updated 
https://github.com/llvm/llvm-project/pull/65776:

>From 967089f4e81d5bfcddeabddf81ab90912b5cc3b3 Mon Sep 17 00:00:00 2001
From: Razvan Lupusoru 
Date: Fri, 8 Sep 2023 09:06:57 -0700
Subject: [PATCH 1/4] [flang][openacc] Enable lowering support for OpenACC
 atomic operations

Since the OpenACC atomics specification is a subset of OpenMP atomics,
the same lowering implementation can be used. This change extracts out
the necessary pieces from the OpenMP lowering and puts them in a shared
spot. The shared spot is a header file so that each implementation can
template specialize directly.

After putting the OpenMP implementation in a common spot, the following
changes were needed to make it work for OpenACC:
* Ensure parsing works correctly by avoiding hardcoded offsets.
* Templatize based on atomic type.
* The checking whether it is OpenMP or OpenACC is done by checking
  for OmpAtomicClauseList (OpenACC does not implement this so we just
  templatize with void). It was preferable to check this instead of
  atomic type because in some cases, like atomic capture, the
  read/write/update implementations are called - and we want compile
  time evaluation of these conditional parts.
* The memory order and hint are used only for OpenMP.
* Generate acc dialect operations instead of omp dialect operations.
---
 flang/lib/Lower/Bridge.cpp|   2 +
 flang/lib/Lower/DirectivesCommon.h| 610 ++
 flang/lib/Lower/OpenACC.cpp   |  34 +-
 flang/lib/Lower/OpenMP.cpp| 523 +--
 .../test/Lower/OpenACC/acc-atomic-capture.f90 |  99 +++
 flang/test/Lower/OpenACC/acc-atomic-read.f90  |  48 ++
 .../Lower/OpenACC/acc-atomic-update-hlfir.f90 |  23 +
 .../test/Lower/OpenACC/acc-atomic-update.f90  |  74 +++
 flang/test/Lower/OpenACC/acc-atomic-write.f90 |  57 ++
 9 files changed, 979 insertions(+), 491 deletions(-)
 create mode 100644 flang/lib/Lower/DirectivesCommon.h
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-capture.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-read.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-update-hlfir.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-update.f90
 create mode 100644 flang/test/Lower/OpenACC/acc-atomic-write.f90

diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 75784f4e5a72be2..cbe108194dd212f 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -2287,9 +2287,11 @@ class FirConverter : public 
Fortran::lower::AbstractConverter {
 
   void genFIR(const Fortran::parser::OpenACCConstruct &acc) {
 mlir::OpBuilder::InsertPoint insertPt = builder->saveInsertionPoint();
+localSymbols.pushScope();
 genOpenACCConstruct(*this, bridge.getSemanticsContext(), getEval(), acc);
 for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations())
   genFIR(e);
+localSymbols.popScope();
 builder->restoreInsertionPoint(insertPt);
   }
 
diff --git a/flang/lib/Lower/DirectivesCommon.h 
b/flang/lib/Lower/DirectivesCommon.h
new file mode 100644
index 000..7177576e039a219
--- /dev/null
+++ b/flang/lib/Lower/DirectivesCommon.h
@@ -0,0 +1,610 @@
+//===-- Lower/DirectivesCommon.h *- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+//
+// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
+//
+//===--===//
+///
+/// A location to place directive utilities shared across multiple lowering
+/// files, e.g. utilities shared in OpenMP and OpenACC. The header file can
+/// be used for both declarations and templated/inline implementations.
+//===--===//
+
+#ifndef FORTRAN_LOWER_DIRECTIVES_COMMON_H
+#define FORTRAN_LOWER_DIRECTIVES_COMMON_H
+
+#include "flang/Common/idioms.h"
+#include "flang/Lower/Bridge.h"
+#include "flang/Lower/ConvertExpr.h"
+#include "flang/Lower/ConvertVariable.h"
+#include "flang/Lower/OpenACC.h"
+#include "flang/Lower/OpenMP.h"
+#include "flang/Lower/PFTBuilder.h"
+#include "flang/Lower/StatementContext.h"
+#include "flang/Optimizer/Builder/BoxValue.h"
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Builder/Todo.h"
+#include "flang/Optimizer/HLFIR/HLFIROps.h"
+#include "flang/Parser/parse-tree.h"
+#include "flang/Semantics/openmp-directive-sets.h"
+#include "flang/Semantics/tools.h"
+#include "mlir/Dialect/OpenACC/OpenACC.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/Dialect/SCF/IR/SCF.h"
+#include "llvm/Frontend/OpenMP/OMPConstants.h"
+#inc

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru edited 
https://github.com/llvm/llvm-project/pull/137972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Razvan Lupusoru via cfe-commits


@@ -13,17 +13,103 @@
 #include "CIRGenBuilder.h"
 #include "CIRGenFunction.h"
 #include "CIRGenOpenACCClause.h"
-#include "mlir/Dialect/OpenACC/OpenACC.h"
+
 #include "clang/AST/OpenACCClause.h"
 #include "clang/AST/StmtOpenACC.h"
 
+#include "mlir/Dialect/OpenACC/OpenACC.h"
+
 using namespace clang;
 using namespace clang::CIRGen;
 using namespace cir;
 using namespace mlir::acc;
 
 mlir::LogicalResult
 CIRGenFunction::emitOpenACCLoopConstruct(const OpenACCLoopConstruct &s) {
-  cgm.errorNYI(s.getSourceRange(), "OpenACC Loop Construct");
-  return mlir::failure();
+  mlir::Location start = getLoc(s.getSourceRange().getBegin());
+  mlir::Location end = getLoc(s.getSourceRange().getEnd());
+  llvm::SmallVector retTy;
+  llvm::SmallVector operands;
+  auto op = builder.create(start, retTy, operands);
+
+  // TODO(OpenACC): In the future we are going to need to come up with a
+  // transformation here that can teach the acc.loop how to figure out the
+  // 'lowerbound', 'upperbound', and 'step'.
+  //
+  // -'upperbound' should fortunately be pretty easy as it should be
+  // in the initialization section of the cir.for loop. In Sema, we limit to
+  // just the forms 'Var = init', `Type Var = init`, or `Var = init` (where it
+  // is an operator= call)`.  However, as those are all necessary to emit for
+  // the init section of the for loop, they should be inside the initial
+  // cir.scope.
+  //
+  // -'upperbound' should be somewhat easy to determine. Sema is limiting this
+  // to: ==, <, >, !=,  <=, >= builtin operators, the overloaded 'comparison'
+  // operations, and member-call expressions.
+  //
+  // For the builtin comparison operators, we can pretty well deduce based on
+  // the comparison what the 'end' object is going to be, and the inclusive
+  // nature of it.
+  //
+  // For the overloaded operators, Sema will ensure that at least one side of
+  // the operator is the init variable, so we can deduce the comparison there
+  // too. The standard places no real bounds on WHAT the comparison operators 
do
+  // for a `RandomAccessIterator` however, so we'll have to just 'assume' they
+  // do the right thing? Note that this might be incrementing by a different
+  // 'object', not an integral, so it isn't really clear to me what we can do 
to
+  // determine the other side.
+  //
+  // Member-call expressions are the difficult ones. I don't think there is
+  // anything we can deduce from this to determine the 'end', so we might end 
up
+  // having to go back to Sema and make this ill-formed.
+  //
+  // HOWEVER: What ACC dialect REALLY cares about is the tripcount, which you
+  // cannot get (in the case of `RandomAccessIterator`) from JUST 'upperbound'
+  // and 'lowerbound'. We will likely have to provide a 'recipe' equivilent to
+  // `std::distance` instead.  In the case of integer/pointers, it is fairly
+  // simple to find: it is just the mathematical subtraction. Howver, in the
+  // case of `RandomAccessIterator`, we have to enable the use of `operator-`.
+  // FORTUNATELY the standard requires this to work correctly for
+  // `RandomAccessIterator`, so we don't have to implement a `std::distance`
+  // that loops through, like we would for a forward/etc iterator.
+  //
+  // 'step': Sema is currently allowing builtin ++,--, +=, -=, *=, /=, and =
+  // operators. Additionally, it allows the equivilent for the operator-call, 
as

razvanlupusoru wrote:

equivilent -> equivalent

https://github.com/llvm/llvm-project/pull/137972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Thank you Erich! Your prose on possibilities and challenges is a great idea for 
inclusion.

https://github.com/llvm/llvm-project/pull/137972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Razvan Lupusoru via cfe-commits


@@ -13,17 +13,103 @@
 #include "CIRGenBuilder.h"
 #include "CIRGenFunction.h"
 #include "CIRGenOpenACCClause.h"
-#include "mlir/Dialect/OpenACC/OpenACC.h"
+
 #include "clang/AST/OpenACCClause.h"
 #include "clang/AST/StmtOpenACC.h"
 
+#include "mlir/Dialect/OpenACC/OpenACC.h"
+
 using namespace clang;
 using namespace clang::CIRGen;
 using namespace cir;
 using namespace mlir::acc;
 
 mlir::LogicalResult
 CIRGenFunction::emitOpenACCLoopConstruct(const OpenACCLoopConstruct &s) {
-  cgm.errorNYI(s.getSourceRange(), "OpenACC Loop Construct");
-  return mlir::failure();
+  mlir::Location start = getLoc(s.getSourceRange().getBegin());
+  mlir::Location end = getLoc(s.getSourceRange().getEnd());
+  llvm::SmallVector retTy;
+  llvm::SmallVector operands;
+  auto op = builder.create(start, retTy, operands);
+
+  // TODO(OpenACC): In the future we are going to need to come up with a
+  // transformation here that can teach the acc.loop how to figure out the
+  // 'lowerbound', 'upperbound', and 'step'.
+  //
+  // -'upperbound' should fortunately be pretty easy as it should be
+  // in the initialization section of the cir.for loop. In Sema, we limit to
+  // just the forms 'Var = init', `Type Var = init`, or `Var = init` (where it
+  // is an operator= call)`.  However, as those are all necessary to emit for
+  // the init section of the for loop, they should be inside the initial
+  // cir.scope.
+  //
+  // -'upperbound' should be somewhat easy to determine. Sema is limiting this
+  // to: ==, <, >, !=,  <=, >= builtin operators, the overloaded 'comparison'
+  // operations, and member-call expressions.
+  //
+  // For the builtin comparison operators, we can pretty well deduce based on
+  // the comparison what the 'end' object is going to be, and the inclusive
+  // nature of it.
+  //
+  // For the overloaded operators, Sema will ensure that at least one side of
+  // the operator is the init variable, so we can deduce the comparison there
+  // too. The standard places no real bounds on WHAT the comparison operators 
do
+  // for a `RandomAccessIterator` however, so we'll have to just 'assume' they
+  // do the right thing? Note that this might be incrementing by a different
+  // 'object', not an integral, so it isn't really clear to me what we can do 
to
+  // determine the other side.
+  //
+  // Member-call expressions are the difficult ones. I don't think there is
+  // anything we can deduce from this to determine the 'end', so we might end 
up
+  // having to go back to Sema and make this ill-formed.
+  //
+  // HOWEVER: What ACC dialect REALLY cares about is the tripcount, which you
+  // cannot get (in the case of `RandomAccessIterator`) from JUST 'upperbound'
+  // and 'lowerbound'. We will likely have to provide a 'recipe' equivilent to
+  // `std::distance` instead.  In the case of integer/pointers, it is fairly
+  // simple to find: it is just the mathematical subtraction. Howver, in the
+  // case of `RandomAccessIterator`, we have to enable the use of `operator-`.
+  // FORTUNATELY the standard requires this to work correctly for
+  // `RandomAccessIterator`, so we don't have to implement a `std::distance`
+  // that loops through, like we would for a forward/etc iterator.
+  //
+  // 'step': Sema is currently allowing builtin ++,--, +=, -=, *=, /=, and =
+  // operators. Additionally, it allows the equivilent for the operator-call, 
as
+  // well as member-call.
+  //
+  // For builtin operators, we perhaps should refine the assignment here. It
+  // doesn't reallly help us know the 'step' count at all, but we could perhaps

razvanlupusoru wrote:

reallly -> really

https://github.com/llvm/llvm-project/pull/137972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [OpenACC][CIR] Implement Loop lowering of seq/auto/independent (PR #138164)

2025-05-01 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Awesome. Thank you for continuing to contribute the builders to the dialect.

https://github.com/llvm/llvm-project/pull/138164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-05 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Thank you. LGTM

https://github.com/llvm/llvm-project/pull/138576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-05 Thread Razvan Lupusoru via cfe-commits


@@ -336,6 +348,52 @@ class OpenACCClauseCIREmitter final
   return clauseNotImplemented(clause);
 }
   }
+
+  void VisitCollapseClause(const OpenACCCollapseClause &clause) {
+if constexpr (isOneOfTypes) {
+  llvm::APInt value =
+  clause.getIntExpr()->EvaluateKnownConstInt(cgf.cgm.getASTContext());
+
+  if (value.getBitWidth() != 64)
+value = value.sext(64);

razvanlupusoru wrote:

The OpenACC spec does not provide exact clarification on what "integer 
expression" is - except in one spot in the spec:
```
5348 Async-argument – an async-argument is a nonnegative scalar integer 
expression (int for C or C++, integer for Fortran)
```
It seems the intent is that they are 32-bit integers.

https://github.com/llvm/llvm-project/pull/138576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-05 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru edited 
https://github.com/llvm/llvm-project/pull/138576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [NFC][OpenACC] addDeviceType to init/shutdown ops (PR #137372)

2025-04-25 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Thank you! I am happy to see this improvement!

https://github.com/llvm/llvm-project/pull/137372
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [mlir][acc] Use consistent name for device_num operand (PR #136745)

2025-04-22 Thread Razvan Lupusoru via cfe-commits

razvanlupusoru wrote:

> Also, we have `getIfCondMutable` in a number of places as well, which is now 
> inconsistent with skipping the 'operand'.

I am not sure I follow - are you saying that for consistency, you think that 
the word 'operand' should be included in the name of `ifCond` (or excluded for 
other cases)? We do have multiple cases where we do not use the word 'operand' 
- for example in acc.parallel we have numGangs, numWorkers, vectorLength, 
selfCond, ifCond. It is used in cases where it looks awkward to not have it. 
For example `asyncOperands` and `waitOperands`. This is subjective though :)

https://github.com/llvm/llvm-project/pull/136745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [mlir][acc] Use consistent name for device_num operand (PR #136745)

2025-04-22 Thread Razvan Lupusoru via cfe-commits

razvanlupusoru wrote:

I plan on merging this as soon as the 2 pending checks complete :)

https://github.com/llvm/llvm-project/pull/136745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Thank you so much for doing this!

https://github.com/llvm/llvm-project/pull/137396
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenACC][CIR] Implement basic lowering for combined constructs (PR #139119)

2025-05-08 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Thank you!

https://github.com/llvm/llvm-project/pull/139119
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenACC][CIR] Implement basic lowering for combined constructs (PR #139119)

2025-05-08 Thread Razvan Lupusoru via cfe-commits

razvanlupusoru wrote:

> in that they are the only one where there are two operations for a single 
> construct.

https://mlir.llvm.org/docs/Dialects/OpenACCDialect/#operation-categories
There are other categories where a single construct leads to multiple 
operations. See description at the link above about the "second group". I 
should add combined constructs to that list.

https://github.com/llvm/llvm-project/pull/139119
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [mlir] [OpenACC][CIR] Implement 'gang' lowering for 'loop' (PR #138968)

2025-05-08 Thread Razvan Lupusoru via cfe-commits

https://github.com/razvanlupusoru approved this pull request.

Nice work!

https://github.com/llvm/llvm-project/pull/138968
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits