[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode
JF Bastien via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 11 04:18:08 PDT 2022
jfb added a subscriber: Florian.
jfb added a comment.
I think the most relevant post from @rsmith is: https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-option/55143/40
He has a prototype: https://reviews.llvm.org/D79249
I assume he would like someone to pursue it further, it was a good faith attempt at not just demanding. I'd played with it and it needed a few fixes, but overall it was pretty complete. Does someone want to give it a go?
That prototype would still diverge from the GCC option, which I hear isn't desirable.
The discussions on standardizing this are perpetually stalled whenever they come up, so it's not an avenue that I ever expect to turn positive.
The fact remains that people have deployed zero init widely (you're likely running multiple zero-init codebases to read this), and they would not ever deploy zero-or-trap init. That's simply a fact.
Richard had said:
> If we want a separate flag to control whether / how much we use such a trapping mode, I think that could be reasonable, subject to having a good answer to the language dialect concern I expressed previously (eg, maybe there’s never a guarantee that we won’t insert a trap, even though with the flag on its lowest setting that is actually what happens).
If someone pursues Richard's patch above, then this would seem like a mutually agreeable resolution.
Separately, we'd discussed narrowing the performance gap between pattern and zero-init, @Florian and team had done a bunch of work 2+ years ago, but I don't know how "done" we can claim that work is since I haven't been tracking the work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125142/new/
https://reviews.llvm.org/D125142
More information about the cfe-commits
mailing list