HomePhabricator

Avoid calculating the string hash twice in GsymCreator::insertString.

Authored by simon.giesecke on May 14 2021, 3:59 AM.

Description

Avoid calculating the string hash twice in GsymCreator::insertString.

Do the single hash calculation before acquiring the lock, to reduce
lock contention. If Copy is true, and the string was not yet contained
in the StringStorage, use the new address from StringStorage, but
reuse the hash we already calculated.

Differential Revision: https://reviews.llvm.org/D102484

Details

Committed
simon.gieseckeMay 19 2021, 3:06 AM
Differential Revision
D102484: Avoid calculating the string hash twice in GsymCreator::insertString.
Parents
rGe102fd50f9c6: Reformat GSYMCreator.cpp
Branches
Unknown
Tags
Unknown