[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)
Asher Mancinelli via flang-commits
flang-commits at lists.llvm.org
Mon Mar 24 11:34:44 PDT 2025
ashermancinelli wrote:
Thanks for the reviews, everyone!
In response to @kiranchandramohan and @jeanPerier 's questions/comments:
> What about array_merge_store?
> fir_CopyOp will also need this interface.
There are several ops (copy, array_merge, embox, ext_embox) and at least one more type (`fir.box`) that will need to be updated to handle volatility. I will update this PR with those changes. I don't intend to merge this all at once, but it will be nice to have the full change in one diff to agree on the design before I start sending smaller patches.
Also, Jean suggested on the discourse thread that the volatile argument should _not_ have a default:
> it is easier to control/make sure code is aware of VOLATILE aspect by adding a flag in the existing memory type and making it a mandatory (not optional) value in the type builder/ctor of that type. That way, people have to provide some VOLATILE parameter when construction new result types and think for a minute where this information should come from in their case.
I like this idea and will include it in the next revision. This will make the diff much larger, but I agree that this will make it harder for users of the type to forget to handle volatility.
https://github.com/llvm/llvm-project/pull/132486
More information about the flang-commits
mailing list