[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Mon Mar 24 10:47:27 PDT 2025
================
@@ -3253,16 +3255,18 @@ struct LoadOpConversion : public fir::FIROpConversion<fir::LoadOp> {
mlir::Value boxSize =
computeBoxSize(loc, boxTypePair, inputBoxStorage, rewriter);
auto memcpy = rewriter.create<mlir::LLVM::MemcpyOp>(
- loc, newBoxStorage, inputBoxStorage, boxSize, /*isVolatile=*/false);
+ loc, newBoxStorage, inputBoxStorage, boxSize, isVolatile);
if (std::optional<mlir::ArrayAttr> optionalTag = load.getTbaa())
memcpy.setTBAATags(*optionalTag);
else
attachTBAATag(memcpy, boxTy, boxTy, nullptr);
rewriter.replaceOp(load, newBoxStorage);
} else {
+ // TODO: are we losing any attributes from the load op?
----------------
kiranchandramohan wrote:
It might be useful to pass-through some attributes like access.group (https://llvm.org/docs/LangRef.html#llvm-access-group-metadata) if these have to be added in a previous stage (like when the fir.do_loop is lowered).
Note: Not a strong opinion
https://github.com/llvm/llvm-project/pull/132486
More information about the flang-commits
mailing list