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

Eduard Zingerman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 2 15:02:19 PDT 2023


eddyz87 updated this revision to Diff 557541.
eddyz87 added a comment.

Additional changes to address feedback from @erichkeane:

- Update for `hasBPFPreserveStaticOffset`: added null check for `getPointeeType()` result (note: currently this function is only called for array base, so `getPointeeType()` always returns a non-null but I think that having a null check instead of assert is still better in this context).
- Update for all .ll test cases to remove references to clang version or compilation directory from all metadata.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133361

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/test/CodeGen/bpf-preserve-static-offset-arr.c
  clang/test/CodeGen/bpf-preserve-static-offset-bitfield.c
  clang/test/CodeGen/bpf-preserve-static-offset-lvalue.c
  clang/test/CodeGen/bpf-preserve-static-offset-non-bpf.c
  clang/test/CodeGen/bpf-preserve-static-offset-pai.c
  clang/test/Misc/pragma-attribute-supported-attributes-list.test
  clang/test/Sema/bpf-attr-preserve-static-offset-warns-nonbpf.c
  clang/test/Sema/bpf-attr-preserve-static-offset-warns.c
  clang/test/Sema/bpf-attr-preserve-static-offset.c
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/IntrinsicsBPF.td
  llvm/lib/Target/BPF/BPF.h
  llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
  llvm/lib/Target/BPF/BPFCORE.h
  llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
  llvm/lib/Target/BPF/BPFPreserveStaticOffset.cpp
  llvm/lib/Target/BPF/BPFTargetMachine.cpp
  llvm/lib/Target/BPF/CMakeLists.txt
  llvm/test/CodeGen/BPF/preserve-static-offset/load-align.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-arr-pai.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-atomic.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-chain-2.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-chain-oob.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-chain-u8-oob.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-chain-u8-type-mismatch.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-chain-u8.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-chain.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-inline.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-non-const.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-ptr-pai.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-simple.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-struct-pai.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-undo-align.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-undo-chain-oob.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-undo-chain-u8.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-undo-chain.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-undo-simple.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-undo-volatile.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-union-pai.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-unroll-inline.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-unroll.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-volatile.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/load-zero.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-align.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-atomic.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-2.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-oob.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-u8-oob.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-chain-u8.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-chain.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-pai.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-simple.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-undo-align.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-undo-chain-oob.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-undo-chain-u8.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-undo-chain.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-undo-simple.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-undo-volatile.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-unroll-inline.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-volatile.ll
  llvm/test/CodeGen/BPF/preserve-static-offset/store-zero.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133361.557541.patch
Type: text/x-patch
Size: 186862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20231002/2a995eb8/attachment-0001.bin>


More information about the cfe-commits mailing list