[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Fri May 16 15:58:58 PDT 2025


================
@@ -36,6 +37,76 @@ template <typename ToTest> constexpr bool isCombinedType = false;
 template <typename T>
 constexpr bool isCombinedType<CombinedConstructClauseInfo<T>> = true;
 
+namespace {
+struct DataOperandInfo {
+  mlir::Location beginLoc;
+  mlir::Value varValue;
+  llvm::StringRef name;
+  mlir::ValueRange bounds;
+
+  DataOperandInfo(mlir::Location beginLoc, mlir::Value varValue,
+                  llvm::StringRef name, mlir::ValueRange bounds)
+      : beginLoc(beginLoc), varValue(varValue), name(name), bounds(bounds) {}
+};
+
+inline mlir::Value createIntExpr(CIRGen::CIRGenFunction &cgf,
----------------
bcardosolopes wrote:

I understand this is necessary because of templates, but the amount of code in the header file is a bit scary, any chance we can move some of this to implementation files? If not, perhaps use a more specific name for things living inside this namespace? `createIntExpr` for instance is a bit misleading (sounds simple but ends up doing an unrealized cast).

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


More information about the cfe-commits mailing list