https://github.com/andykaylor commented:

I really hate the fact that we're inserting something in the IR that survives 
lowering to LLVM IR just as a hint to the calling convention lowering pass.

I'm going to experiment with introducing a new type to describe a bitfield. So

`struct S { unsigned a : 2; unsigned b : 5; unsigned c : 1; };`

would be represented in CIR like:

`!rec_S { data !cir.bitfield<u, 32, 2>, data !cir.bitfield<u, 32, 5>, data 
!cir.bitfield<u, 32, 1> };`

I think this would solve both the extent problem and the zero-length bitfield 
problem. It could also allow us to get rid of `#cir.bitfield_info`.

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

Reply via email to