aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-16 16:03:27 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-16 16:03:27 +0000
commit4bc7731a29b88f78869c1e21b5691618e6363814 (patch)
tree259d1667dde051bfc79321d402d56b066d4a33d0 /clang/lib/Frontend/CompilerInvocation.cpp
parent0051f2dc78ad32880f2440305291417bed27e0ff (diff)
downloadllvm-4bc7731a29b88f78869c1e21b5691618e6363814.zip
llvm-4bc7731a29b88f78869c1e21b5691618e6363814.tar.gz
llvm-4bc7731a29b88f78869c1e21b5691618e6363814.tar.bz2
InstrProf: Calculate a better function hash
The function hash should change when control flow changes. This patch hashes the type of each AST node that affects counters, rather than just counting how many there are. These types are combined into a small enumerator that currently has 16 values. The new hash algorithm packs the enums for consecutively visited types into a `uint64_t`. In order to save space for new types, the types are assumed to be 6-bit values (instead of 4-bit). In order to minimize overhead for functions with little control flow, the `uint64_t` is used directly as a hash if it never fills up; if it does, it's passed through an MD5 context. <rdar://problem/16435801> llvm-svn: 206397
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions