[flang-commits] [flang] [Flang] Add FIR and LLVM lowering support for prefetch directive (PR #167272)

via flang-commits flang-commits at lists.llvm.org
Wed Dec 17 01:56:03 PST 2025


================
@@ -4264,6 +4264,84 @@ void fir::StoreOp::getEffects(
   addVolatileMemoryEffects({getMemref().getType()}, effects);
 }
 
+//===----------------------------------------------------------------------===//
+// PrefetchOp
+//===----------------------------------------------------------------------===//
+
+mlir::ParseResult fir::PrefetchOp::parse(mlir::OpAsmParser &parser,
----------------
jeanPerier wrote:

Since you are using a custom parser/printer, please add a few parse/unparse tests for it in test/FIR.

Personally, I would probably have gone for a dumb format that could fit in .td assembly string format to avoid the hassle and maintenance burden of a custom printer/parser.

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


More information about the flang-commits mailing list