• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- Inliner.cpp -------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "flang/Optimizer/Dialect/FIRDialect.h"
10 #include "flang/Optimizer/Dialect/FIROps.h"
11 #include "flang/Optimizer/Transforms/Passes.h"
12 #include "mlir/Transforms/Passes.h"
13 #include "llvm/Support/CommandLine.h"
14 
15 static llvm::cl::opt<bool>
16     aggressivelyInline("inline-all",
17                        llvm::cl::desc("aggressively inline everything"),
18                        llvm::cl::init(false));
19 
20 /// Should we inline the callable `op` into region `reg`?
canLegallyInline(mlir::Operation * op,mlir::Region * reg,mlir::BlockAndValueMapping & map)21 bool fir::canLegallyInline(mlir::Operation *op, mlir::Region *reg,
22                            mlir::BlockAndValueMapping &map) {
23   return aggressivelyInline;
24 }
25