[flang-commits] [flang] [flang][NFC] Extract FIROpConversion to its own files (PR #86213)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Mar 22 08:48:03 PDT 2024


================
@@ -0,0 +1,249 @@
+//===-- FIROpPatterns.h -- FIR operation conversion patterns ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef FORTRAN_OPTIMIZER_CODEGEN_FIROPPATTERNS_H
+#define FORTRAN_OPTIMIZER_CODEGEN_FIROPPATTERNS_H
+
+#include "flang/Optimizer/CodeGen/TypeConverter.h"
+#include "mlir/Conversion/LLVMCommon/Pattern.h"
+#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
+
+namespace fir {
+
+struct FIRToLLVMPassOptions;
+
+// TODO: This should really be recovered from the specified target.
----------------
vzakhari wrote:

Right, `0` is always the default address space in LLVM.  Address spaces for specific objects (e.g. global variables) may be dependent on the target.

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


More information about the flang-commits mailing list