OSDN Git Service

Compute some Debug Info Metadata hash key partially (NFC)
authorMehdi Amini <mehdi.amini@apple.com>
Sat, 19 Mar 2016 00:59:26 +0000 (00:59 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Sat, 19 Mar 2016 00:59:26 +0000 (00:59 +0000)
commit343753f293ed6021a3ca13b8affcdf14c8439b59
treeef1282b4fe87f55f18ec7a7df161d3be11e9c63e
parent8268477130dfbe370985c2292b70dcd163e5ec7b
Compute some Debug Info Metadata hash key partially (NFC)

Summary:
This patch changes the computation of the hash key for DISubprogram to
be computed on a small subset of the fields. The hash is computed a
lot faster, but there might be more collision in the table.
However by carefully selecting the fields, colisions should be rare.

Using `opt` to load the IR for FastISelEmitter.cpp.o, with this patch:
 - DISubprogram::getImpl() goes from 28ms to 15ms.
 - DICompositeType::getImpl() goes from 6ms to 2ms
 - DIDerivedType::getImpl() goes from 18 to 12ms

Reviewers: dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16571

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263866 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/LLVMContextImpl.h