You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's generally no need to zero out PODs, and no need to zero out anything beyond the first pointer of a non-POD data structure containing unique values. (Drop glue can simply bail out at the first null pointer it finds.)
LLVM does not optimize out redundant zeroing out of structs, unless all functions that operate on the struct are inlined and SROA happens. Neither does GCC. I believe (but haven't thought too deeply about it) that this is probably an unsafe optimization with the semantics of C. So this could be a rather large win for code size.
The text was updated successfully, but these errors were encountered:
There's generally no need to zero out PODs, and no need to zero out anything beyond the first pointer of a non-POD data structure containing unique values. (Drop glue can simply bail out at the first null pointer it finds.)
LLVM does not optimize out redundant zeroing out of structs, unless all functions that operate on the struct are inlined and SROA happens. Neither does GCC. I believe (but haven't thought too deeply about it) that this is probably an unsafe optimization with the semantics of C. So this could be a rather large win for code size.
The text was updated successfully, but these errors were encountered: