[Mlir-commits] [flang] [mlir] [flang][acc] Introduce interface for rematerializable ops (PR #174467)
Slava Zakharin
llvmlistbot at llvm.org
Mon Jan 5 11:26:52 PST 2026
================
@@ -61,6 +61,18 @@ void registerOpenACCExtensions(mlir::DialectRegistry ®istry) {
*ctx);
fir::TypeDescOp::attachInterface<
IndirectGlobalAccessModel<fir::TypeDescOp>>(*ctx);
+
+ // Attach OutlineRematerializationOpInterface to FIR operations that
+ // produce synthetic types (shapes, field indices) which cannot be passed
+ // as arguments to outlined regions and must be rematerialized inside.
+ fir::ShapeOp::attachInterface<
----------------
vzakhari wrote:
FWIW, I am trying to make some of these operations `Pure` in https://github.com/llvm/llvm-project/pull/174013/changes#diff-331d2a770c888079c815ef2fdc6e69e18e48479dcdeedb91c9c6fd889f78ce5fR1993
I guess any `Pure` operation may be rematerializable as well (hence, we may not need the new interface), though, I am not sure how well this will work from the point of OpenACC liveness analysis.
https://github.com/llvm/llvm-project/pull/174467
More information about the Mlir-commits
mailing list