]> granicus.if.org Git - clang/commit
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 4 May 2017 03:36:16 +0000 (03:36 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 4 May 2017 03:36:16 +0000 (03:36 +0000)
commitc7f067120d7e2358bd45de2c839d906579ba814c
tree1711fe8d4c68537060463905582a0399ae62d6cd
parentf195b64c780cc36265ea7d814e5d8c783638c08f
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.

When profiling a no-op incremental link of Chromium I found that the functions
computeImportForFunction and computeDeadSymbols were consuming roughly 10% of
the profile. The goal of this change is to improve the performance of those
functions by changing the map lookups that they were previously doing into
pointer dereferences.

This is achieved by changing the ValueInfo data structure to be a pointer to
an element of the global value map owned by ModuleSummaryIndex, and changing
reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs.
This means that a ValueInfo will take a client directly to the summary list
for a given GUID.

Differential Revision: https://reviews.llvm.org/D32471

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302108 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BackendUtil.cpp