================
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Implementation of external OpenACC operation interfaces for CIR.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/CIR/Dialect/OpenACC/CIROpenACCOpsInterfaces.h"
+
+#include "clang/CIR/Dialect/IR/CIRTypes.h"
+#include "clang/CIR/Dialect/OpenACC/CIROpenACCUtils.h"
+
+using namespace mlir;
+using namespace cir;
+
+SymbolRefAttr cir::acc::AddressOfGlobalModel::getSymbol(Operation *op) const {
+  return cast<GetGlobalOp>(op).getNameAttr();
+}
+
+bool cir::acc::GlobalVariableModel::isConstant(Operation *op) const {
+  return cast<GlobalOp>(op).getConstant();
+}
+
+bool cir::acc::GlobalVariableModel::hasInitializer(Operation *op) const {
+  return cast<GlobalOp>(op).hasInitializer();
+}
+
+Region *cir::acc::GlobalVariableModel::getInitRegion(Operation *op) const {
+  Region &ctorRegion = cast<GlobalOp>(op).getCtorRegion();
+  return ctorRegion.empty() ? nullptr : &ctorRegion;
+}
----------------
clementval wrote:

Makes sense. Thanks for the clarification!

https://github.com/llvm/llvm-project/pull/244313
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [clang] [... Razvan Lupusoru via cfe-commits
    • [cla... via cfe-commits
    • [cla... Razvan Lupusoru via cfe-commits
    • [cla... Razvan Lupusoru via cfe-commits
    • [cla... Valentin Clement バレンタイン クレメン via cfe-commits

Reply via email to