aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorJean Perier <jperier@nvidia.com>2020-01-28 04:58:30 -0800
committerJean Perier <jperier@nvidia.com>2020-02-17 02:38:49 -0800
commit336408679535454f8708899cc49cda9395dd725a (patch)
tree128687838397f4735ba2ac583a93e47a4b55611a /flang/lib/CMakeLists.txt
parentc52cd6355ca7f0cfcd259a4e5e6a544141619628 (diff)
downloadllvm-336408679535454f8708899cc49cda9395dd725a.zip
llvm-336408679535454f8708899cc49cda9395dd725a.tar.gz
llvm-336408679535454f8708899cc49cda9395dd725a.tar.bz2
[flang] Add Pre-FIR Tree structure to help lowering the parse-tree
The Pre-FIR Tree structure is a transient data structure that is meant to be built from the parse tree just before lowering to FIR and that will be deleted just afterwards. It is not meant to perfrom optimization analysis and transformations. It only provides temporary information, such as label target information or parse tree parent nodes, that is meant to be used to lower the parse tree structure into FIR operations. A PFTBuilder class builds the Pre-Fir Tree from the parse-tree. A pretty printer is available to visualize this data structure. - Lit tests are added to: 1. that the PFT tree structure is as expected 2. that the PFT captures all intented nodes - Cmake changes: Prevent warnings inisde LLVM headers when compiling flang The issue is that some LLVM headers define functions where the usage of the parameters depend on environment ifdef. See for instance Size in: https://github.com/llvm/llvm-project/blob/5f940220bf9438e95ffa4a627ac1591be1e1ba6e/llvm/include/llvm/Support/Compiler.h#L574 Because flang is build with -Werror and -Wunused-parameter is default in clang, this may breaks build in some environments (like with clang9 on macos). A solution would be to add -Wno-unused-parameter to flang CmakLists.txt, but it is wished to keep this warning on flang sources for quality purposes. Fixing LLVM headers is not an easy task and `[[maybe_unused]]` is C++17 and cannot be used yet in LLVM headers. Hence, this fix simply silence warnings coming from LLVM headers by telling CMake they are to be considered as if they were system headers. - drone.io changes: remove llvm 6.0 from clang config in drone.io and link flang with libstdc++ instead of libc++ llvm-dev resolved to llvm-6.0 in clang builds on drone.io. llvm 6.0 too old. LLVM packages are linked with libstdc++ standard library whereas libc++ was used for flang. This caused link time failure when building clang. Change frone.io to build flang with libc++. 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: 864898cbe509d032abfe1172ec367dbd3dd92bc1 and 137c23da9c64cf90584cf81fd646053a69e91f63 Other changes come from https://github.com/flang-compiler/f18/pull/959 review. Original-commit: flang-compiler/f18@edb0943bca4b81689f320bda341040bf255d6e2e Reviewed-on: https://github.com/flang-compiler/f18/pull/959
Diffstat (limited to 'flang/lib/CMakeLists.txt')
-rw-r--r--flang/lib/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/flang/lib/CMakeLists.txt b/flang/lib/CMakeLists.txt
index 343195ba..35c3e13 100644
--- a/flang/lib/CMakeLists.txt
+++ b/flang/lib/CMakeLists.txt
@@ -9,5 +9,6 @@
add_subdirectory(common)
add_subdirectory(evaluate)
add_subdirectory(decimal)
+add_subdirectory(lower)
add_subdirectory(parser)
add_subdirectory(semantics)