[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Tue Mar 25 13:59:23 PDT 2025
vzakhari wrote:
> For Assign in particular, I think we can use fir::factory::genScalarAssignment to get volatile loads/stores instead of doing it in the runtime at all. I'm still going through the other runtime routines.
Arrays may be volatile as well, right, so we will have the runtime calls in some cases?
I believe our calls have the most conservative memory effects (currently), so passing volatile to them should not be a problem. I think we will have to account for `VOLATILE` in `flang/lib/Optimizer/Transforms/SetRuntimeCallAttributes.cpp`.
> at least one more type (fir.box) that will need to be updated to handle volatility
Sounds right. I do not have a ready answer, but we will need to clarify how `VOLATILE` is applied to different cases like `!fir.box<...>`, !fir.ref<!fir.box<...>>`, ... In the latter case, I think `VOLATILE` applies to the object and not to the box reference itself, but I am not sure.
https://github.com/llvm/llvm-project/pull/132486
More information about the flang-commits
mailing list