Skip to content
Commit 256f1dd0 authored by Benjamin Kramer's avatar Benjamin Kramer
Browse files

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
parent 30797b2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment