[patch] Check the linkage cache at every recursive step
Rafael EspĂndola
rafael.espindola at gmail.com
Tue May 28 08:11:25 PDT 2013
Currently the linkage cache is only used by the entry level function
(getLinkage). The function that does the actual computation
(getLVForDecl), never looks at it.
This means that we fail to reuse an entry in the cache when
getLVForDecl does a recursive call. The attached patch fixes that by
adding another computation enum value for when we don't care about the
linkage at all and having getLVForDecl check the cache in that case.
When running "clang -cc1" over SemaExpr.ii this brings the number of
linkage computations from 93749 to 58426. When running "clang -cc1
-emit-llvm -O3" it goes from 198708 to 161444.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 6489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130528/2d7be6bb/attachment.obj>
More information about the cfe-commits
mailing list