Skip to content

Commit 0c5eb4d

Browse files
authored
[flang] Use precompiled parsing headers (#130600)
Most of the high memory usage and compilation time in the frontend units is due to including large parsing headers. This commit moves out several of the largest parsing headers into a new precompiled header linked to flangFrontend. The new compilation metrics for FrontendActions.cpp are as follows: User time (seconds): 38.40 System time (seconds): 2.00 Maximum resident set size (kbytes): 2710964 (2.58 GB) (vs 3.78 GB) ParserActions.cpp: User time (seconds): 69.37 System time (seconds): 1.81 Maximum resident set size (kbytes): 2599456 (2.47 GB) (vs 4 GB) Alongside the new precompiled header compilation unit User time (seconds): 41.61 System time (seconds): 2.72 Maximum resident set size (kbytes): 3107644 (2.96 GB) --------- Signed-off-by: Kajetan Puchalski <[email protected]>
1 parent 481a55a commit 0c5eb4d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flang/lib/Frontend/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,11 @@ add_flang_library(flangFrontend
7272
clangBasic
7373
clangDriver
7474
)
75+
76+
target_precompile_headers(flangFrontend PRIVATE
77+
[["flang/Parser/parsing.h"]]
78+
[["flang/Parser/parse-tree.h"]]
79+
[["flang/Parser/dump-parse-tree.h"]]
80+
[["flang/Lower/PFTBuilder.h"]]
81+
[["flang/Lower/Bridge.h"]]
82+
)

0 commit comments

Comments
 (0)