aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorjeanPerier <jeanPerier@users.noreply.github.com>2020-03-11 21:47:22 -0700
committerGitHub <noreply@github.com>2020-03-11 21:47:22 -0700
commit57f536a448559b6e56388700653cc43f38152f12 (patch)
treecbae7efc0ced99271bc169f7ecbba1b929a86088 /flang/lib/CMakeLists.txt
parent989cbfb0c4094899f5932db594ea7a4db0915551 (diff)
downloadllvm-57f536a448559b6e56388700653cc43f38152f12.zip
llvm-57f536a448559b6e56388700653cc43f38152f12.tar.gz
llvm-57f536a448559b6e56388700653cc43f38152f12.tar.bz2
[flang] Add Fortran IR (FIR) MLIR dialect implementation (flang-compiler/f18#1035)
Adds FIR library that implements an MLIR dialect to which Fortran parse-tree will be lowered to. FIR is defined and documented inside FIROps.td added in this commit. It is possible to generate a more readable description FIRLangRef.md from FIROps.td following the related instructions added to the README.md by this commit. This patch adds FIR definition and implementation that allow parsing, printing, and verifying FIR. FIR transformations and lowering to Standard and LLVM dialects are not part of this patch. The FIR verifiers are verifying the basic properties of FIR operations in order to provide a sufficient frame for lowering. Verifiers for more advanced FIR properties can be added as needed. Coarrays are not covered by FIR defined in this patch. This patch also adds tco tool that is meant to process FIR input files and drives transformations on it. The tco tool is used for testing. In this patch, it is only used to demonstrate parsing/verifying/ and dumping FIR with round-trip tests. Note: This commit does not reflect an actual work log, it is a feature-based split of the changes done in the FIR experimental branch. The related work log can be found in the commits between: https://github.com/schweitzpgi/f18/commit/742edde572bd74d77cf7d447132ccf0949187fce and https://github.com/schweitzpgi/f18/commit/2ff55242126d86061f4fed9ef7b59d3636b5fd0b Changes on top of these original commits were made during this patch review. Original-commit: flang-compiler/f18@30b428a51e140e5fb12bd53a0619f10ff510f408 Reviewed-on: https://github.com/flang-compiler/f18/pull/1035
Diffstat (limited to 'flang/lib/CMakeLists.txt')
-rw-r--r--flang/lib/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/flang/lib/CMakeLists.txt b/flang/lib/CMakeLists.txt
index fae2eed..f2fe30d 100644
--- a/flang/lib/CMakeLists.txt
+++ b/flang/lib/CMakeLists.txt
@@ -12,3 +12,7 @@ add_subdirectory(Decimal)
add_subdirectory(Lower)
add_subdirectory(Parser)
add_subdirectory(Semantics)
+
+if(LINK_WITH_FIR)
+ add_subdirectory(Optimizer)
+endif()