[flang-commits] [flang] [llvm] [mlir] [llvm][mlir][flang][OpenMP] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)
Nikita Popov via flang-commits
flang-commits at lists.llvm.org
Wed Nov 20 00:48:20 PST 2024
================
@@ -0,0 +1,232 @@
+//===--- Atomic.h - Codegen of atomic operations
+//---------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_FRONTEND_ATOMIC_ATOMIC_H
+#define LLVM_FRONTEND_ATOMIC_ATOMIC_H
+
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/Intrinsics.h"
+#include "llvm/IR/Module.h"
+#include "llvm/IR/Operator.h"
+#include "llvm/IR/RuntimeLibcalls.h"
+
+namespace llvm {
+
+template <typename IRBuilderTy> struct AtomicInfo {
+
+ IRBuilderTy *Builder;
+ Type *Ty;
+ uint64_t AtomicSizeInBits;
+ uint64_t ValueSizeInBits;
+ llvm::Align AtomicAlign;
+ llvm::Align ValueAlign;
----------------
nikic wrote:
You should not be using `llvm::` prefixes inside `namespace llvm {}`.
https://github.com/llvm/llvm-project/pull/92364
More information about the flang-commits
mailing list