PFTBuilder.cpp
DEPENDS
- FIRDialect
- FIRSupport
- FIRTransforms
+ FIROptimizer
${dialect_libs}
LINK_LIBS
- FIRDialect
- FIRSupport
- FIRTransforms
+ FIROptimizer
${dialect_libs}
FortranCommon
FortranParser
-add_subdirectory(CodeGen)
-add_subdirectory(Dialect)
-add_subdirectory(Support)
-add_subdirectory(Transforms)
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+
+add_flang_library(FIROptimizer
+ Dialect/FIRAttr.cpp
+ Dialect/FIRDialect.cpp
+ Dialect/FIROps.cpp
+ Dialect/FIRType.cpp
+
+ Support/FIRContext.cpp
+ Support/InternalNames.cpp
+ Support/KindMapping.cpp
+
+ CodeGen/CGOps.cpp
+ CodeGen/PreCGRewrite.cpp
+
+ Transforms/Inliner.cpp
+
+ DEPENDS
+ FIROpsIncGen
+ FIROptCodeGenPassIncGen
+ FIROptTransformsPassIncGen
+ CGOpsIncGen
+ ${dialect_libs}
+
+ LINK_LIBS
+ ${dialect_libs}
+ MLIRLLVMToLLVMIRTranslation
+ MLIRTargetLLVMIRExport
+
+ LINK_COMPONENTS
+ AsmParser
+ AsmPrinter
+ Remarks
+)
+++ /dev/null
-add_flang_library(FIRCodeGen
- CGOps.cpp
- PreCGRewrite.cpp
-
- DEPENDS
- FIRDialect
- FIRSupport
- FIROptCodeGenPassIncGen
- CGOpsIncGen
-
- LINK_LIBS
- FIRDialect
- FIRSupport
- MLIROpenMPToLLVM
- MLIRLLVMToLLVMIRTranslation
- MLIRTargetLLVMIRExport
-
- LINK_COMPONENTS
- AsmParser
- AsmPrinter
- Remarks
-)
+++ /dev/null
-add_flang_library(FIRDialect
- FIRAttr.cpp
- FIRDialect.cpp
- FIROps.cpp
- FIRType.cpp
-
- DEPENDS
- FIRSupport
- FIROpsIncGen
-
- LINK_LIBS
- FIRSupport
- MLIROpenMPToLLVM
- MLIRLLVMToLLVMIRTranslation
- MLIRTargetLLVMIRExport
-
- LINK_COMPONENTS
- AsmParser
- AsmPrinter
- Remarks
-)
+++ /dev/null
-add_flang_library(FIRSupport
- FIRContext.cpp
- InternalNames.cpp
- KindMapping.cpp
-
- DEPENDS
- ${dialect_libs}
- MLIRIR
-
- LINK_LIBS
- ${dialect_libs}
- MLIROpenMPToLLVMIRTranslation
- MLIRLLVMToLLVMIRTranslation
- MLIRTargetLLVMIRExport
-)
+++ /dev/null
-add_flang_library(FIRTransforms
- Inliner.cpp
-
- DEPENDS
- FIRDialect
- FIRSupport
- FIROptTransformsPassIncGen
-
- LINK_LIBS
- FIRDialect
- MLIRAffineToStandard
- MLIRLLVMIR
- MLIROpenACC
- MLIROpenMP
- FIRSupport
-)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
target_link_libraries(fir-opt PRIVATE
- FIRDialect
- FIRSupport
- FIRTransforms
- FIRCodeGen
+ FIROptimizer
${dialect_libs}
# TODO: these should be transitive dependencies from a target providing
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
set(LIBS
- FIRCodeGen
- FIRDialect
- FIRSupport
- FIRTransforms
+ FIROptimizer
${dialect_libs}
MLIRIR
MLIRLLVMIR
add_subdirectory(Optimizer)
add_subdirectory(Decimal)
add_subdirectory(Evaluate)
+add_subdirectory(Lower)
add_subdirectory(Runtime)
add_subdirectory(Frontend)
--- /dev/null
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+
+set(LIBS
+ FIROptimizer
+ MLIRLLVMIR
+ ${dialect_libs}
+)
+
+add_flang_unittest(FlangLoweringTests
+ RTBuilder.cpp
+)
+
+target_link_libraries(FlangLoweringTests
+ PRIVATE
+ ${LIBS})
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
set(LIBS
- FIRCodeGen
- FIRDialect
- FIRSupport
+ FIROptimizer
${dialect_libs}
)
FIRContextTest.cpp
InternalNamesTest.cpp
KindMappingTest.cpp
- RTBuilder.cpp
)
target_link_libraries(FlangOptimizerTests
PRIVATE