[flang-commits] [flang] [flang][cuda] Avoid inserting GetDeviceAddress call in offload regions (PR #175225)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Fri Jan 9 11:14:57 PST 2026
================
@@ -49,9 +50,9 @@ namespace {
static bool inDeviceContext(mlir::Operation *op) {
if (op->getParentOfType<cuf::KernelOp>())
return true;
- if (auto funcOp = op->getParentOfType<mlir::gpu::GPUFuncOp>())
+ if (op->getParentOfType<mlir::acc::OffloadRegionOpInterface>())
----------------
razvanlupusoru wrote:
The diffs look a bit weird - so to explain what I did:
- I added a new check for acc::OffloadRegionOpInterface which includes both acc regions and gpu.launch
- I removed the gpu.launch case since it is already covered.
https://github.com/llvm/llvm-project/pull/175225
More information about the flang-commits
mailing list