https://github.com/rjmccall commented:

Is this really all that's required?  It looks like you're just filling in 
explicit zero padding when emitting constant initializers.  That should steer 
clear of any possibility that LLVM would treat the padding as `undef` for 
optimization purposes (surely `undef` bytes are still emitted as zero when 
rendering the initializer in assembly? it doesn't hurt to be more explicit, of 
course), so okay, it's good to do.  But I assume that similar code is required 
in order to explicitly zero out any padding when dynamically initializing a 
local variable.

Also, is adding constant padding fields retroactively really the best way to 
handle this instead of just expecting the constant emitter to fill them in 
itself?

https://github.com/llvm/llvm-project/pull/97121
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to