[flang-commits] [flang] [llvm] [mlir] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

via flang-commits flang-commits at lists.llvm.org
Thu Sep 19 23:02:21 PDT 2024


NimishMishra wrote:

> @tblah Mentions that there is still a problem in that this emits libcall atomics (EmitAtomicLoadLibcall, `__atomic_compare_exchange`) that not all targets support. This was also what my CGAtomic refactoring proposal intended to solve.


Thanks @Meinersbur for the review. Yes I agree. I was wondering whether the target's information can be exposed somehow in the IRBuilder or translation? If so, can we appropriately error out a TODO like "atomic update variable is a struct requiring an atomic libcall which is absent on the target". Alternatively, should we add a lightweight interface in LLVM Frontend that returns a decision whether the target supports the libcalls?

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


More information about the flang-commits mailing list