#include "mlir/Pass/PassRegistry.h"
#include "mlir/Transforms/LocationSnapshot.h"
#include "mlir/Transforms/Passes.h"
-#include "flang/Optimizer/CodeGen/CodeGen.h"
namespace fir::support {
-// The definitive list of dialects used by flang.
-#define FLANG_DIALECT_LIST \
- mlir::AffineDialect, FIROpsDialect, FIRCodeGenDialect, \
- mlir::LLVM::LLVMDialect, mlir::acc::OpenACCDialect, \
+#define FLANG_NONCODEGEN_DIALECT_LIST \
+ mlir::AffineDialect, FIROpsDialect, mlir::acc::OpenACCDialect, \
mlir::omp::OpenMPDialect, mlir::scf::SCFDialect, \
mlir::StandardOpsDialect, mlir::vector::VectorDialect
+// The definitive list of dialects used by flang.
+#define FLANG_DIALECT_LIST \
+ FLANG_NONCODEGEN_DIALECT_LIST, FIRCodeGenDialect, mlir::LLVM::LLVMDialect
+
/// Register all the dialects used by flang.
inline void registerDialects(mlir::DialectRegistry ®istry) {
registry.insert<FLANG_DIALECT_LIST>();
mlir::registerAffineDataCopyGenerationPass();
mlir::registerConvertAffineToStandardPass();
-
- // Flang passes
- fir::registerOptCodeGenPasses();
}
} // namespace fir::support
//===----------------------------------------------------------------------===//
#include "mlir/Support/MlirOptMain.h"
+#include "flang/Optimizer/CodeGen/CodeGen.h"
#include "flang/Optimizer/Support/InitFIR.h"
#include "flang/Optimizer/Transforms/Passes.h"
int main(int argc, char **argv) {
fir::support::registerMLIRPassesForFortranTools();
+ fir::registerOptCodeGenPasses();
fir::registerOptTransformPasses();
DialectRegistry registry;
fir::support::registerDialects(registry);