[libcxx-commits] [PATCH] D65667: [libcxx] Avoid destructor call for error_category singletons
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 23 11:31:04 PDT 2019
EricWF added a comment.
In D65667#1643059 <https://reviews.llvm.org/D65667#1643059>, @hubert.reinterpretcast wrote:
> In D65667#1642281 <https://reviews.llvm.org/D65667#1642281>, @EricWF wrote:
> > Sorry for being late to the party, I've looked at the codege of this and other approachs. what we want is a single global than initializes all of objects we need. Right now we have function local static then may may not have make guards and that's less than ideal.
> In other words, we only want to pay the cost of the destructor registration once for the entire library? I think this might need a new file and is a much larger scope than what this patch is attempting. @EricWF, is this patch being subsumed into a bigger effort?
That doesn't need to happen now. But I want to see these changed to be global statics not function local. At least that way we omit the guards entirely. and accessing the variable becomes a single instruction.
CHANGES SINCE LAST ACTION
More information about the libcxx-commits