[flang-commits] [flang] [Flang] Extracting internal constants from scalar literals (PR #73829)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Dec 7 10:04:57 PST 2023


================
@@ -242,6 +242,16 @@ def MemoryAllocationOpt : Pass<"memory-allocation-opt", "mlir::func::FuncOp"> {
   let constructor = "::fir::createMemoryAllocationPass()";
 }
 
+// This needs to be a "mlir::ModuleOp" pass, because it inserts global constants
+def ConstExtruderOpt : Pass<"const-extruder-opt", "mlir::ModuleOp"> {
+  let summary = "Convert scalar literals of function arguments to global constants.";
+  let description = [{
+    Convert scalar literals of function arguments to global constants.
----------------
kiranchandramohan wrote:

```suggestion
    Convert constant function arguments to global constants.
```

https://github.com/llvm/llvm-project/pull/73829


More information about the flang-commits mailing list