[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 23:10:38 PDT 2024
https://github.com/efriedma-quic commented:
Bitfield load and store operations should be done using the same offset/size we normally use to access the bitfield; unconditionally using byte load/store operations will impair optimizations/performance. I guess this might not be possible when unions are involved, but it shouldn't be that hard for the non-union cases.
The format of builtin-clear-padding-codegen.cpp seems mostly fine, but consider using update_cc_test_checks.py to automate writing the CHECK lines. Please add a couple tests for empty classes and unions.
A few comments in the code outlining how the recursion and the interval representation work would be helpful.
https://github.com/llvm/llvm-project/pull/75371
More information about the cfe-commits
mailing list