aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-12-11 18:00:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-12-11 18:00:22 +0000
commita07b59e5e9b55033239c80552094421a01b75c8a (patch)
tree2d6cbf05264b8c79894070781061e2d0ff2f6f54 /lib/Lex/Preprocessor.cpp
parent10b5fa283359bd423f8624c4dda11899bcc8ca9c (diff)
Speed up looking up static diagnostic infos.
Instead of doing a binary search over the whole diagnostic table (which weighs a whopping 48k on x86_64), use the existing enums to compute the index in the table. This avoids loading any unneeded data from the table and avoids littering CPU caches with it. This code is in a hot path for code with many diagnostics. 1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions