forked from OSchip/llvm-project
Avoid std::map&vector in hexagon builtin code to save code size
Constructing a global std::map requires clang to generate a linear amount of code to construct the initializer list if the elements are not constexpr-constructible. std::vector is not constexpr-constructible, so this code pattern was generating large amounts of code. Also, because of PR38829, LLVM is pathologically slow on large basic blocks, and this causes slow compilation. This works around the bug and reduces code size. SemaChecking.cpp -debug-info-kind=limited: time objsize before: 1m45.023s 9.8M after: 0m25.205s 6.9M So, a 42% obj size reduction and 3.2x speedup. llvm-svn: 345329
This commit is contained in:
parent
a0254cac4b
commit
9e9606ec18