[flang-commits] [flang] [flang] Apply the offload-region stack arrays rule in the allocation policy (PR #228539)
Zhen Wang via flang-commits
flang-commits at lists.llvm.org
Fri Oct 2 12:53:08 PDT 2026
================
@@ -110,10 +114,18 @@ struct AllocationInfo : PendingAllocationInfo {
bool isCurrentlyOnStack = false;
};
+/// Return true if \p op is nested in code that is offloaded to a device: an
+/// OpenACC compute construct or specialized routine, a CUDA Fortran kernel
+/// loop, a gpu.launch, a gpu.func or a gpu.module. Code there runs on the
+/// device stack, which is far smaller than the host one.
+bool isInOffloadRegion(mlir::Operation *op);
----------------
wangzpgi wrote:
Moved to FIROpsSupport.h. Only cost is a new MLIRGPUDialect link for the dialect library.
https://github.com/llvm/llvm-project/pull/228539
More information about the flang-commits
mailing list