summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/OpenACC/Transforms/LegalizeDataValues.cpp
AgeCommit message (Collapse)Author
2025-05-01[mlir][acc] Add LegalizeDataValues support for DeclareEnterOp (#138008)Susan Tan (ス-ザン タン)
The patch extends the existing LegalizeDataValues to support DeclareEnter and DeclareExit pair. Since unlike other ops, DeclareEnter and DeclareExit don't have a region defined, we use dominance/post dominance information to ensure only the uses within the region dominated by DeclareEnter and post dominated by DeclareExit are updated with data on device.
2025-04-14[mlir][acc] Handle OpenACC host_data in LegalizeDataValues (#134767)nvptm
`LegalizeDataValuesInRegion` is intended to replace the SSA values used in a region with the output of data operations, but misses the handling of the OpenACC `host_data` construct. As a result, currently ``` !$acc host_data use_device(%var) ...%var... !$acc end host_data ``` is lowered to ``` %dev_var = acc.use_device(%var) acc.host_data data_operands(%dev_var) { ...%var... } ``` This pull request updates the LegalizeDataValuesInRegion to handle HostDataOp such that lowering results in ``` %dev_var = acc.use_device(%var) acc.host_data data_operands(%dev_var) { ...%dev_var... } ```
2025-01-31[mlir][acc] Update LegalizeDataValues pass to allow MappableType (#125134)Razvan Lupusoru
With the addition of new type interface MappableType, the LegalizeDataValues should not make the assumption it can obtain a pointer to the data (aka acc::getVarPtr() is now not guaranteed to get a value - acc::getVar() must be used instead). Thus update the pass to ensure it handles any var used in its data clause operations.
2024-11-01[mlir][acc] Consistency between acc.loop and acc compute ops (#114549)Razvan Lupusoru
- GangPrivate and GangFirstPrivate renamed to just Private and Firstprivate respectively. This is makes compute ops consistent with the loop op (and also with the acc spec wording for the clause). - Added getBody to all compute ops - Verifier for firstprivate ops / recipes is enabled
2024-10-21[acc] Improve LegalizeDataValues pass to handle data constructs (#112990)Razvan Lupusoru
Renames LegalizeData to LegalizeDataValues since this pass fixes up SSA values. LegalizeData suggested that it fixed data mapping. This change also adds support to fix up ssa values for data clause operations. Effectively, compute regions within a data region use the ssa values from data operations also. The ssa values within data regions but not within compute regions are not updated. This change is to support the requirement in the OpenACC spec which notes that a visible data clause is not just one on the current compute construct but on the lexically containing data construct or visible declare directive.