[flang-commits] [flang] [NFC][flang] Introduce FortranObjectViewOpInterface. (PR #166841)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Mon Nov 10 09:04:19 PST 2025
================
@@ -938,8 +949,9 @@ def hlfir_EndAssociateOp : hlfir_Op<"end_associate", [MemoryEffects<[MemFree]>]>
let hasVerifier = 1;
}
-def hlfir_AsExprOp : hlfir_Op<"as_expr",
- [DeclareOpInterfaceMethods<MemoryEffectsOpInterface>]> {
+def hlfir_AsExprOp
+ : hlfir_Op<"as_expr", [DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
+ fir_FortranObjectViewOpInterface]> {
----------------
vzakhari wrote:
Thanks for the comment, Jean!
Yes, attaching the interface to `hlfir.as_expr` feels a bit off, since the result is not a memory. I will bring back the original code, and then we can think if we can remove it (i.e. make the `expr` source never alias with anything else, and let the codegen handle any conflicts).
https://github.com/llvm/llvm-project/pull/166841
More information about the flang-commits
mailing list