aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2016-03-18 03:48:09 +0000
committerPete Cooper <peter_cooper@apple.com>2016-03-18 03:48:09 +0000
commitef4e36ad998085770e9230182c3db5240f29dfcf (patch)
tree6f39d231cd5d9e7be70caed57d0ea95caa8e2fc8 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentc43b584c1c19e0604f1aa7dc6ca5c004490e7f1e (diff)
downloadllvm-ef4e36ad998085770e9230182c3db5240f29dfcf.zip
llvm-ef4e36ad998085770e9230182c3db5240f29dfcf.tar.gz
llvm-ef4e36ad998085770e9230182c3db5240f29dfcf.tar.bz2
Use StringRef's in resolved path cache to avoid extra internString lookups. NFC.
ResolvedPaths was storing std::string's as a cache. We would then take those strings and look them up in the internString pool to get a unique StringRef for each path. This patch changes ResolvedPaths to store the StringRef pointing in to the internString pool itself. This way, when getResolvedPath returns a string, we know we have the StringRef we would find in the pool anyway. We can avoid the duplicate memory of the std::string's, and also the time from the lookup. Unfortunately my profiles show no runtime change here, but it should still save memory allocations which is nice. Reviewed by Frederic Riss. Differential Revision: http://reviews.llvm.org/D18259 llvm-svn: 263774
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions