[llvm-commits] [PATCH 07/20] [AVX] Unique BitInit

David A. Greene greened at obbligato.org
Tue Jul 19 14:14:11 PDT 2011


David Blaikie <dblaikie at gmail.com> writes:

> I'd probably put these constants outside the function, just so the
> compiler doesn't emit its own lazy initializers (if it can prove that
> the construction order is irrelevant, then it could skip the lazy
> init, but otherwise it must init these local statics on the first
> call, not before)

Well, there's a scoping issue there.  It seems to me like not polluting
the llvm namespace is more beneficial than avoiding some lazy
initialization that might happen once and probably not ever because
compiler's aren't that smart.  :)

> Of course this lazy init feedback applies to your other CRs too -
> though I think only one other Init type has lazy init of a known set
> of values (the UnInit type, or similar).

UnsetInit is the only other one, I think.  I've fixed both.

                              -Dave



More information about the llvm-commits mailing list