[patch] Check the linkage cache at every recursive step

John McCall rjmccall at apple.com
Tue May 28 09:10:17 PDT 2013


On May 28, 2013, at 8:11 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> 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.

Yes, this looks fine.

John.



More information about the cfe-commits mailing list