[flang-commits] [flang] [flang][NFCI]Use config structure for MLIR to LLVM pass creation (PR #67792)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Sep 29 05:04:37 PDT 2023
================
@@ -18,6 +18,24 @@
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
#include "mlir/IR/BuiltinOps.h"
+#include "llvm/Frontend/Debug/Options.h"
+#include "llvm/Passes/OptimizationLevel.h"
+
+/// Configuriation for the MLIR to LLVM pass pipeline.
+struct MLIRToLLVMPassPipelineConfig {
+ MLIRToLLVMPassPipelineConfig(llvm::OptimizationLevel level) {
+ OptLevel = level;
+ StackArrays = false;
----------------
tblah wrote:
I also added `explicit` to MLIRToLLVMPassPipelineConfig to prevent automatic conversion from an `llvm::OptimizationLevel`.
https://github.com/llvm/llvm-project/pull/67792
More information about the flang-commits
mailing list