forked from OSchip/llvm-project
[flang][NFC] Move current inliner files in Dialect directory
This patch just move the files from the Transforms directory to the Dialect directory. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D117661
This commit is contained in:
parent
911c137054
commit
ccaaeca910
|
@ -15,6 +15,10 @@
|
|||
|
||||
#include "mlir/IR/Dialect.h"
|
||||
|
||||
namespace mlir {
|
||||
class BlockAndValueMapping;
|
||||
} // namespace mlir
|
||||
|
||||
namespace fir {
|
||||
|
||||
/// FIR dialect
|
||||
|
@ -50,6 +54,11 @@ public:
|
|||
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
|
||||
|
|
|
@ -36,10 +36,6 @@ std::unique_ptr<mlir::Pass> createMemDataFlowOptPass();
|
|||
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"
|
||||
|
|
|
@ -3,6 +3,7 @@ add_flang_library(FIRDialect
|
|||
FIRDialect.cpp
|
||||
FIROps.cpp
|
||||
FIRType.cpp
|
||||
Inliner.cpp
|
||||
|
||||
DEPENDS
|
||||
CanonicalizationPatternsIncGen
|
||||
|
|
|
@ -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 @@ static llvm::cl::opt<bool>
|
|||
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;
|
||||
}
|
|
@ -4,7 +4,6 @@ add_flang_library(FIRTransforms
|
|||
AffineDemotion.cpp
|
||||
CharacterConversion.cpp
|
||||
ArrayValueCopy.cpp
|
||||
Inliner.cpp
|
||||
ExternalNameConversion.cpp
|
||||
MemoryAllocation.cpp
|
||||
MemRefDataFlowOpt.cpp
|
||||
|
|
Loading…
Reference in New Issue