[gn build] Port 8ebc35f8d041
[llvm-project.git] / flang / lib / Optimizer / Dialect / Inliner.cpp
blob93da611ad5a79a25bdfaf82cd47f6ed71d7b55ba
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 //===----------------------------------------------------------------------===//
9 #include "flang/Optimizer/Dialect/FIRDialect.h"
10 #include "llvm/Support/CommandLine.h"
12 static llvm::cl::opt<bool>
13 aggressivelyInline("inline-all",
14 llvm::cl::desc("aggressively inline everything"),
15 llvm::cl::init(false));
17 /// Should we inline the callable `op` into region `reg`?
18 bool fir::canLegallyInline(mlir::Operation *, mlir::Region *, bool,
19 mlir::IRMapping &) {
20 return aggressivelyInline;
23 bool fir::canLegallyInline(mlir::Operation *, mlir::Operation *, bool) {
24 return aggressivelyInline;