eddyz87 added a comment.

In D133361#4629292 <https://reviews.llvm.org/D133361#4629292>, @ast wrote:

> ...
> Right. Such recursive propagation of PAI is necessary. For btf_tag we cannot 
> do it. Always propagating it won't be correct.
> New preserve_const_field_offset would need to be propagated too and we 
> actually have nested unions.
> __bpf_md_ptr is such example. btf_tag wouldn't propagate into that union, but 
> attr(preserve_const_field_offset) should.

Hi Alexei,

It just occurred to me that such an attribute would also require DWARF and BTF 
encoding in order to get reflected in vmlinux.h (which we already have for 
btf_decl_tag). Given this I think we can rename decl tag "ctx" to 
`btf_decl_tag("preserve_const_field_offset")` but we should still keep it a 
`btf_decl_tag`. I'll try to replace usage of `bpf_context_marker` intrinsic by 
metadata, if that fails will just rename the intrinsic to 
`preserve_const_field_offset`.
What do you think? (Sorry, I should have thought this through last week).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133361/new/

https://reviews.llvm.org/D133361

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to