[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 09:25:58 PDT 2023


yonghong-song added a comment.

I tried a couple of examples with both preserve_access_index and preserve_static_offset (both '__preserve_access_index __preserve_static_offset' and '__preserve_static_offset __preserve_access_index'). Looks they cooperate with each other properly. __preserve_static_offset is for base pointer while
__preserve_access_index is for offset. So the current implementation seems OKAY. But __preserve_static_offset actually means 'static offset' (no offset change),
so __preserve_access_index seems not necessary, so if possible maybe clang frontend should make a choice to remove __preserve_access_index if
__preserve_static_offset is there. But this can be done later (need frontend review again, need to update doc etc.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133361



More information about the cfe-commits mailing list