Revert "[fir] Split FIROptimizer lib into several smaller libraries"

This reverts commit c02a8cdda8.
This commit is contained in:
Valentin Clement 2021-10-05 11:19:26 +02:00
parent e86d45ec00
commit 4755fb2e18
No known key found for this signature in database
GPG key ID: 086D54783C928776
12 changed files with 55 additions and 96 deletions

View file

@ -17,15 +17,11 @@ add_flang_library(FortranLower
PFTBuilder.cpp
DEPENDS
FIRDialect
FIRSupport
FIRTransforms
FIROptimizer
${dialect_libs}
LINK_LIBS
FIRDialect
FIRSupport
FIRTransforms
FIROptimizer
${dialect_libs}
FortranCommon
FortranParser

View file

@ -1,4 +1,34 @@
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
)

View file

@ -1,22 +0,0 @@
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
)

View file

@ -1,21 +0,0 @@
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
)

View file

@ -1,15 +0,0 @@
add_flang_library(FIRSupport
FIRContext.cpp
InternalNames.cpp
KindMapping.cpp
DEPENDS
${dialect_libs}
MLIRIR
LINK_LIBS
${dialect_libs}
MLIROpenMPToLLVMIRTranslation
MLIRLLVMToLLVMIRTranslation
MLIRTargetLLVMIRExport
)

View file

@ -1,16 +0,0 @@
add_flang_library(FIRTransforms
Inliner.cpp
DEPENDS
FIRDialect
FIRSupport
FIROptTransformsPassIncGen
LINK_LIBS
FIRDialect
MLIRAffineToStandard
MLIRLLVMIR
MLIROpenACC
MLIROpenMP
FIRSupport
)

View file

@ -3,10 +3,7 @@ llvm_update_compile_flags(fir-opt)
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

View file

@ -1,10 +1,7 @@
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
set(LIBS
FIRCodeGen
FIRDialect
FIRSupport
FIRTransforms
FIROptimizer
${dialect_libs}
MLIRIR
MLIRLLVMIR

View file

@ -39,5 +39,6 @@ endfunction()
add_subdirectory(Optimizer)
add_subdirectory(Decimal)
add_subdirectory(Evaluate)
add_subdirectory(Lower)
add_subdirectory(Runtime)
add_subdirectory(Frontend)

View file

@ -0,0 +1,15 @@
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})

View file

@ -1,9 +1,7 @@
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
set(LIBS
FIRCodeGen
FIRDialect
FIRSupport
FIROptimizer
${dialect_libs}
)
@ -11,7 +9,6 @@ add_flang_unittest(FlangOptimizerTests
FIRContextTest.cpp
InternalNamesTest.cpp
KindMappingTest.cpp
RTBuilder.cpp
)
target_link_libraries(FlangOptimizerTests
PRIVATE