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

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Mon Apr 7 03:13:02 PDT 2025


================
@@ -274,8 +274,10 @@ void createHLFIRToFIRPassPipeline(mlir::PassManager &pm, bool enableOpenMP,
     addNestedPassToAllTopLevelOperations<PassConstructor>(
         pm, hlfir::createInlineHLFIRAssign);
   pm.addPass(hlfir::createConvertHLFIRtoFIR());
-  if (enableOpenMP)
+  if (enableOpenMP) {
     pm.addPass(flangomp::createLowerWorkshare());
+    pm.addPass(flangomp::createLowerNontemporalPass());
----------------
tblah wrote:

I think it would be better to include this pass much later in the pipeline so that loads and stores created by later passes are also included. Maybe around when the function attribute pass runs (right before FIR is lowered to LLVM).

There are also loads/stores created only during CodeGen (FIR to LLVM), but these are for boxes and so far as I can tell nontemporal only refers to data.

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


More information about the flang-commits mailing list