[PATCH] D117661: [flang][NFC] Move current inliner files in Dialect directory
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 04:34:54 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGccaaeca9106d: [flang][NFC] Move current inliner files in Dialect directory (authored by clementval).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117661/new/
https://reviews.llvm.org/D117661
Files:
flang/include/flang/Optimizer/Dialect/FIRDialect.h
flang/include/flang/Optimizer/Transforms/Passes.h
flang/lib/Optimizer/Dialect/CMakeLists.txt
flang/lib/Optimizer/Dialect/Inliner.cpp
flang/lib/Optimizer/Transforms/CMakeLists.txt
flang/lib/Optimizer/Transforms/Inliner.cpp
Index: flang/lib/Optimizer/Transforms/CMakeLists.txt
===================================================================
--- flang/lib/Optimizer/Transforms/CMakeLists.txt
+++ flang/lib/Optimizer/Transforms/CMakeLists.txt
@@ -4,7 +4,6 @@
AffineDemotion.cpp
CharacterConversion.cpp
ArrayValueCopy.cpp
- Inliner.cpp
ExternalNameConversion.cpp
MemoryAllocation.cpp
MemRefDataFlowOpt.cpp
Index: flang/lib/Optimizer/Dialect/Inliner.cpp
===================================================================
--- flang/lib/Optimizer/Dialect/Inliner.cpp
+++ flang/lib/Optimizer/Dialect/Inliner.cpp
@@ -7,9 +7,6 @@
//===----------------------------------------------------------------------===//
#include "flang/Optimizer/Dialect/FIRDialect.h"
-#include "flang/Optimizer/Dialect/FIROps.h"
-#include "flang/Optimizer/Transforms/Passes.h"
-#include "mlir/Transforms/Passes.h"
#include "llvm/Support/CommandLine.h"
static llvm::cl::opt<bool>
@@ -18,7 +15,11 @@
llvm::cl::init(false));
/// Should we inline the callable `op` into region `reg`?
-bool fir::canLegallyInline(mlir::Operation *op, mlir::Region *reg,
- mlir::BlockAndValueMapping &map) {
+bool fir::canLegallyInline(mlir::Operation *, mlir::Region *, bool,
+ mlir::BlockAndValueMapping &) {
+ return aggressivelyInline;
+}
+
+bool fir::canLegallyInline(mlir::Operation *, mlir::Operation *, bool) {
return aggressivelyInline;
}
Index: flang/lib/Optimizer/Dialect/CMakeLists.txt
===================================================================
--- flang/lib/Optimizer/Dialect/CMakeLists.txt
+++ flang/lib/Optimizer/Dialect/CMakeLists.txt
@@ -3,6 +3,7 @@
FIRDialect.cpp
FIROps.cpp
FIRType.cpp
+ Inliner.cpp
DEPENDS
CanonicalizationPatternsIncGen
Index: flang/include/flang/Optimizer/Transforms/Passes.h
===================================================================
--- flang/include/flang/Optimizer/Transforms/Passes.h
+++ flang/include/flang/Optimizer/Transforms/Passes.h
@@ -36,10 +36,6 @@
std::unique_ptr<mlir::Pass> createPromoteToAffinePass();
std::unique_ptr<mlir::Pass> createMemoryAllocationPass();
-/// Support for inlining on FIR.
-bool canLegallyInline(mlir::Operation *op, mlir::Region *reg,
- mlir::BlockAndValueMapping &map);
-
// declarative passes
#define GEN_PASS_REGISTRATION
#include "flang/Optimizer/Transforms/Passes.h.inc"
Index: flang/include/flang/Optimizer/Dialect/FIRDialect.h
===================================================================
--- flang/include/flang/Optimizer/Dialect/FIRDialect.h
+++ flang/include/flang/Optimizer/Dialect/FIRDialect.h
@@ -15,6 +15,10 @@
#include "mlir/IR/Dialect.h"
+namespace mlir {
+class BlockAndValueMapping;
+} // namespace mlir
+
namespace fir {
/// FIR dialect
@@ -50,6 +54,11 @@
static llvm::StringRef getDialectNamespace() { return "fircg"; }
};
+/// Support for inlining on FIR.
+bool canLegallyInline(mlir::Operation *op, mlir::Region *reg, bool,
+ mlir::BlockAndValueMapping &map);
+bool canLegallyInline(mlir::Operation *, mlir::Operation *, bool);
+
} // namespace fir
#endif // FORTRAN_OPTIMIZER_DIALECT_FIRDIALECT_H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117661.401599.patch
Type: text/x-patch
Size: 3243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/4315da45/attachment.bin>
More information about the llvm-commits
mailing list