-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Closed
Copy link
Labels
A-codegenArea: Code generationArea: Code generationI-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationI-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Type
Fields
Give feedbackNo fields configured for issues without a type.