[flang-commits] [flang] [mlir] [flang][acc] Handle ViewLike ops with OutlineRematerializationOpInterface in OffloadLiveInValueCanonicalization (PR #184218)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Thu Mar 5 09:20:15 PST 2026
https://github.com/razvanlupusoru approved this pull request.
After looking at your failing example that led to restoring your previous approach and also considering the original problem you are trying to solve, I see a few different approaches:
- Regarding boxchar being illegal - this can be made legal by ensuring this type implements MappableType interface. So we could go back to sink all converts if this were the case.
- We could also sink fir.convert only in certain conditions (possibly by extending the API of OutlineRematerializationOpInterface). So for example, only ref to scalar conversions.
- Your original problem could also be solved by refining the algorithm in ACCImplicitData to better detect such cases to ensure that ref to scalar conversions are handled as if they were refs.
That said, I am OK with your implementation that you have here. If this problem comes up again, I would urge you to consider starting based on one of the suggestions I noted above. Thank you for your contribution and nice work finding a reasonable approach. :) Thank you for the additional testing.
https://github.com/llvm/llvm-project/pull/184218
More information about the flang-commits
mailing list