Home

InstrProf: Calculate a better function hash

Press ? to show keyboard shortcuts.
Committed
dexonsmithApr 16 2014, 9:03 AM
Parents
rL206396: [mips] Add initial support for NaN2008 in the back-end.
Branches
Unknown
Tags
Unknown
Subscribers
None
Projects
None
Description

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

rL206397

cfe/trunk/lib/CodeGen/CodeGenPGO.cpp

Loading...

cfe/trunk/test/Profile/Inputs/c-attributes.profdata

Loading...

cfe/trunk/test/Profile/Inputs/c-captured.profdata

Loading...

cfe/trunk/test/Profile/Inputs/c-counter-overflows.profdata

Loading...

cfe/trunk/test/Profile/Inputs/c-general.profdata

Loading...

cfe/trunk/test/Profile/Inputs/c-outdated-data.profdata

Loading...

cfe/trunk/test/Profile/Inputs/c-unprofiled-blocks.profdata

Loading...

cfe/trunk/test/Profile/Inputs/cxx-class.profdata

Loading...

cfe/trunk/test/Profile/Inputs/cxx-lambda.profdata

Loading...

cfe/trunk/test/Profile/Inputs/cxx-templates.profdata

Loading...

cfe/trunk/test/Profile/Inputs/cxx-throws.profdata

Loading...

cfe/trunk/test/Profile/Inputs/objc-general.profdata

Loading...

cfe/trunk/test/Profile/c-linkage-available_externally.c

Loading...

cfe/trunk/test/Profile/c-linkage.c

Loading...

cfe/trunk/test/Profile/cxx-linkage.cpp

Loading...

Add Comment