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:
Reid Kleckner 2018-10-25 22:37:30 +00:00
parent a0254cac4b
commit 9e9606ec18
1 changed files with 808 additions and 763 deletions

File diff suppressed because it is too large Load Diff