| commit | 256f1dd0fc2766292071e4ad34a700d2d878dedd | [log] [tgz] |
|---|---|---|
| author | Benjamin Kramer <benny.kra@googlemail.com> | Tue Dec 11 18:00:22 2012 +0000 |
| committer | Benjamin Kramer <benny.kra@googlemail.com> | Tue Dec 11 18:00:22 2012 +0000 |
| tree | d31738075070bee1eda479936f4711307b1c9d4e | |
| parent | 30797b2d7dac51036f3266738402178e85ca0b49 [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. llvm-svn: 169890