[all-commits] [llvm/llvm-project] b88ca6: [NFC][CodeGen] Use llvm::DenseMap for DeferredDecls
yurai007 via All-commits
all-commits at lists.llvm.org
Thu Jan 27 01:58:31 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b88ca619d33bc74e1776d879e43c6fc812ac4ff5
https://github.com/llvm/llvm-project/commit/b88ca619d33bc74e1776d879e43c6fc812ac4ff5
Author: Dawid Jurczak <dawid_jurek at vp.pl>
Date: 2022-01-27 (Thu, 27 Jan 2022)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.h
Log Message:
-----------
[NFC][CodeGen] Use llvm::DenseMap for DeferredDecls
CodeGenModule::DeferredDecls std::map::operator[] seem to be hot especially while code generating huge compilation units.
In such cases using DenseMap instead gives observable compile time improvement. Patch was tested on Linux build with default config acting as benchmark.
Build was performed on isolated CPU cores in silent x86-64 Linux environment following: https://llvm.org/docs/Benchmarking.html#linux rules.
Compile time statistics diff produced by perf and time before and after change are following:
instructions -0.15%, cycles -0.7%, max-rss +0.65%.
Using StringMap instead DenseMap doesn't bring any visible gains.
Differential Revision: https://reviews.llvm.org/D118169
More information about the All-commits
mailing list