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 "llvm/Support/CommandLine.h" 11 12 static llvm::cl::opt<bool> 13 aggressivelyInline("inline-all", 14 llvm::cl::desc("aggressively inline everything"), 15 llvm::cl::init(false)); 16 17 /// Should we inline the callable `op` into region `reg`? 18 bool fir::canLegallyInline(mlir::Operation *, mlir::Region *, bool, 19 mlir::BlockAndValueMapping &) { 20 return aggressivelyInline; 21 } 22 23 bool fir::canLegallyInline(mlir::Operation *, mlir::Operation *, bool) { 24 return aggressivelyInline; 25 } 26