vitalybuka wrote:

> -ftrivial-auto-var-init-max-size is a tradeoff, similar to weaker variants of 
> stack protectors. You set it because full initialization costs too much 
> performance or codesize, and you can't add `__attribute__((uninitialized))` 
> to the hotspots for whatever reason.
> 
> Some patterns are more likely to cause issues, so it probably makes sense to 
> try to target those specific patterns. Prioritizing non-array members is 
> probably reasonable. Prioritizing pointers is probably also reasonable. 
> Floating-point numbers are less likely to cause issues. Not sure if anyone 
> has done research into this sort of thing.

@efriedma-quic Before going to deeper review, can you please clarify if you 
against this change in behavior?

To me, it's not ideal but improvement: if we skip large arrays anyway, 
intuitively initializing surrounding fields seems like improvement?

Cons: is that now it will be slightly harder to reason about what is 
initialized or not, but it was not obvious with  
-ftrivial-auto-var-init-max-size anyway.

https://github.com/llvm/llvm-project/pull/229584
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to