[llvm] [mlir] [MLIR][OpenMP] Lowering nontemporal clause to LLVM IR for SIMD directive (PR #118751)

Kiran Chandramohan via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 05:59:19 PST 2025


kiranchandramohan wrote:

> @kiranchandramohan , ping for review!

Apologies for the delay from my side. I was mostly thinking about the following two points.

1. We should not be making aware the OpenMPIRBuilder code about Fortran specific stuff (like allocatables and descriptors) since this is neutral code and code shared between Clang and MLIR/Flang. Also, it is not clear whether it is possible to accurately identify the descriptor and array loads.
2. The conversion from FIR to LLVM dialect knows which loads are for the descriptors and which are for the actual array contents. Since the LLVM Dialect in MLIR models the nontemporal attribute (https://github.com/llvm/llvm-project/blob/ad38e24eb74e97148faec97c4f843b87768b6e9b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td#L371), we could place the non-temporal attribute during this conversion. But this again has two issues because we are making FIR to LLVM aware of OpenMP semantics and also skipping the OpenMP IRBuilder for lowering OpenMP code.

CC: @kparzysz @skatrak @tblah @agozillon 

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


More information about the llvm-commits mailing list