[Mlir-commits] [flang] [mlir] [flang][OpenACC] Fix implicit data mapping for deviceptr inside host_data (PR #192710)
Razvan Lupusoru
llvmlistbot at llvm.org
Fri Apr 17 11:55:53 PDT 2026
================
@@ -311,9 +311,22 @@ Operation *ACCImplicitData::getOriginalDataClauseOpForAlias(
if (auto *dataClauseOp = dataClause.getDefiningOp()) {
// Only accept clauses that guarantee that the alias is present.
if (isa<acc::CopyinOp, acc::CreateOp, acc::PresentOp, acc::NoCreateOp,
- acc::DevicePtrOp>(dataClauseOp))
- if (aliasAnalysis.alias(acc::getVar(dataClauseOp), var).isMust())
+ acc::DevicePtrOp>(dataClauseOp)) {
+ Value clauseVar = acc::getVar(dataClauseOp);
+ if (aliasAnalysis.alias(clauseVar, var).isMust())
return dataClauseOp;
+ // For deviceptr clauses, also check if the clause variable is
+ // directly derived from 'var' (e.g., deviceptr operates on
+ // embox(var) — the box wrapping var). This arises when a
----------------
razvanlupusoru wrote:
Typically for OpenACC dialect passes we don't mention out-of-tree (eg FIR) dialect cases. So such a comment would not belong here. In the FIR tests themself you add you can likely mention more details for why we expect certain aspects.
https://github.com/llvm/llvm-project/pull/192710
More information about the Mlir-commits
mailing list