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)
commit53fc3895e0c5c6a25951d980ca236e23a7cffe3d
tree00cda545bacb45db2cc46fece0e68c6f19f50181
parentd23be3d30d808c4c0d9a6cbd98274ec49afef7a9
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>
llvm-svn: 263866
llvm/lib/IR/LLVMContextImpl.h