flang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py)
set(FLANG_TEST_DEPENDS
- f18 FileCheck count not module_files fir-opt
+ f18 FileCheck count not module_files
)
list(APPEND FLANG_TEST_DEPENDS tco)
// Test the FIR operations
-// Parse operations and check that we can reparse what we print.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+
+// RUN: tco -emit-fir %s | tco -emit-fir | FileCheck %s
// CHECK-LABEL: func private @it1() -> !fir.int<4>
// CHECK: func private @box1() -> !fir.boxchar<2>
// Test the FIR types
-// Parse types and check that we can reparse what we print.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+
+// RUN: tco -emit-fir %s | tco -emit-fir | FileCheck %s
// Fortran Intrinsic types
// CHECK-LABEL: func private @it1() -> !fir.int<4>
+++ /dev/null
-add_flang_tool(fir-opt fir-opt.cpp)
-llvm_update_compile_flags(fir-opt)
-get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
-
-target_link_libraries(fir-opt PRIVATE
- FIROptimizer
- ${dialect_libs}
-
- # TODO: these should be transitive dependencies from a target providing
- # "registerFIRPasses()"
- MLIRAffineToStandard
- MLIROptLib
-)
+++ /dev/null
-//===- fir-opt.cpp - FIR Optimizer Driver -----------------------*- 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
-//
-//===----------------------------------------------------------------------===//
-//
-// This is to be like LLVM's opt program, only for FIR. Such a program is
-// required for roundtrip testing, etc.
-//
-//===----------------------------------------------------------------------===//
-
-#include "mlir/Support/MlirOptMain.h"
-#include "flang/Optimizer/Dialect/FIRDialect.h"
-
-using namespace mlir;
-
-int main(int argc, char **argv) {
- fir::registerFIRPasses();
- DialectRegistry registry;
- fir::registerFIRDialects(registry);
- return failed(MlirOptMain(argc, argv, "FIR modular optimizer driver\n",
- registry, /*preloadDialectsInContext*/ false));
-}