Skip to content

Commit 31d9ad8

Browse files
committed
[flang][Lower] Explicitly instantiate all templates from Utils.h
This is intended to reduce the memory usage while compiling flang sources. Specifically, this reduced the peak memory use when compiling OpenMP.cpp (on my machine) from 4.9g to 3.6g. The change was to only leave template declarations in the header file and explicitly instantiate every case that was previously instantiated implicitly. If a new implicit instantiation appears later on, it will cause a compilation error (and the explicit instantiation will need to be added manually). Most of the instantiation declarations are generated by an included python script (about 6000 cases). The remaining cases (~1000) are listed explicitly.
1 parent d553e5d commit 31d9ad8

File tree

5 files changed

+9130
-394
lines changed

5 files changed

+9130
-394
lines changed

0 commit comments

Comments
 (0)