[flang-commits] [flang] [Flang][OpenMP] Provide option to use heap allocation for private adjustable arrays (PR #186795)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Mar 16 06:55:14 PDT 2026
================
@@ -14,24 +14,27 @@
#include "flang/Lower/AbstractConverter.h"
#include "flang/Lower/Allocatable.h"
-#include "flang/Lower/CUDA.h"
#include "flang/Lower/ConvertVariable.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Builder/Character.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/HLFIRTools.h"
#include "flang/Optimizer/Builder/Runtime/Derived.h"
#include "flang/Optimizer/Builder/Todo.h"
-#include "flang/Optimizer/Dialect/CUF/CUFOps.h"
#include "flang/Optimizer/Dialect/FIROps.h"
#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Optimizer/HLFIR/HLFIRDialect.h"
#include "flang/Optimizer/HLFIR/HLFIROps.h"
#include "flang/Optimizer/Support/FatalError.h"
#include "flang/Semantics/symbol.h"
-#include "flang/Semantics/tools.h"
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
#include "mlir/IR/Location.h"
+#include "llvm/Support/CommandLine.h"
+
+static llvm::cl::opt<bool> enableGPUHeapAlloc(
+ "enable-gpu-heap-alloc",
+ llvm::cl::desc("Allow to use heap alloc for adjustable arrays on GPU"),
----------------
tblah wrote:
nit
```suggestion
llvm::cl::desc("Allow the use of heap allocation for dynamically sized arrays on GPU"),
```
https://github.com/llvm/llvm-project/pull/186795
More information about the flang-commits
mailing list