[clang] [clang] Better bitfield access units (PR #65742)

Nathan Sidwell via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 08:52:40 PDT 2023


urnathan wrote:


> One very brief note: in the comments in the code, you might want to distinguish between the semantic width of a bitfield (i.e. the C standard notion of a "memory location", which has ABI significance), vs. the accesses we choose to generate (we don't need to generate no-op reads/writes).

Indeed, the naming here is unfortunately overloaded. SysV psABIs use 'Storage Unit' (at least 86 does, and IIRC others follow the same nomenclature).  But Clang also uses 'StorageInfo' and 'Storage$FOO' in its bitfield structures, which is unfortunate.  I've used 'Access Unit' to describe the latter in this patch.  If you meant something else, please clarify (or if I've missed some places?).


https://github.com/llvm/llvm-project/pull/65742


More information about the cfe-commits mailing list