[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
parent
bb5c1b06
Please register or sign in to comment