[cfe-commits] [patch] Cache visibility computation

Douglas Gregor dgregor at apple.com
Thu Dec 20 15:34:09 PST 2012


On Nov 20, 2012, at 8:20 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> When first looking at the testcase in pr13844 my first idea was
> caching the visibility computation. I did some simpler fixes first,
> but decided to try caching too.

I've wanted to get visibility cached for a while. This looks like a good step. FWIW, there's a typo "Explict" here:

+  /// \brief true if the visibility is explicit.
+  mutable unsigned CachedVisibilityExplict : 1;

> The attached patch implements it, but after the previous fixes we are
> now spending most of the time of that testcase just linking the decls,
> so the performance impact is in the noise. It might still be a good
> idea to do it since it provides an assert on what conditions can
> change the computed visibility.


Interesting. Well, killing one source of the performance problem here might help us kill the next one…


	- Doug



More information about the cfe-commits mailing list