[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 16 10:50:55 PDT 2024


efriedma-quic wrote:

(For reference, this was reapplied in #110051.)

I'm not anticipating significant performance regressions here in normal usage: all the bits that are getting initialized are padding adjacent to initialized fields, so I expect the additional initialization will usually be free, and cheap in edge cases where it isn't free.  There's a chance of regressions in some edge cases, but that doesn't seem like enough to warrant an option.

Could you clarify which parts of this you'd want to disable?  Handling for all variables?  Handling for local variables?  Handling for variables where C23 rules don't require zero-init?

https://github.com/llvm/llvm-project/pull/97121


More information about the cfe-commits mailing list