aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2020-05-28 15:57:11 -0700
committerVedant Kumar <vsk@apple.com>2020-06-04 16:58:45 -0700
commit198762680e1e66518ee531c9cce5bf1933accea3 (patch)
tree0f56aa0a506eb5021ed8c577cacc63b1415b4b18 /clang/lib/CodeGen/CodeGenModule.cpp
parentc0cd1f1c5cc97e0c90727b3e4d5f52dd6a7aae55 (diff)
downloadllvm-198762680e1e66518ee531c9cce5bf1933accea3.zip
llvm-198762680e1e66518ee531c9cce5bf1933accea3.tar.gz
llvm-198762680e1e66518ee531c9cce5bf1933accea3.tar.bz2
[LiveDebugValues] Cache LexicalScopes::getMachineBasicBlocks, NFCI
Summary: Cache the results from getMachineBasicBlocks in LexicalScopes to speed up UserValueScopes::dominates queries. This replaces the caching done in UserValueScopes. Compared to the old caching method, this reduces memory traffic when a VarLoc is copied (e.g. when a VarLocMap grows), and enables caching across basic blocks. When compiling sqlite 3.5.7 (CTMark version), this patch reduces the number of calls to getMachineBasicBlocks from 10,207 to 1,093. I also measured a small compile-time reduction (~ 0.1% of total wall time, on average, on my machine). As a drive-by, I made the DebugLoc in UserValueScopes a const reference to cut down on MetadataTracking traffic. Reviewers: jmorse, Orlando, aprantl, nikic Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80957
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions