[all-commits] [llvm/llvm-project] 6ee71e: [BPF] handle opaque-pointer for __builtin_preserve...

yonghong-song via All-commits all-commits at lists.llvm.org
Thu Apr 14 11:35:08 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6ee71e53e56b382d3f3a38751f84b02feb0befda
  Author: Yonghong Song <yhs at fb.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
    A llvm/test/CodeGen/BPF/CORE/intrinsic-typeinfo-enum-value-opaque-pointer.ll

  Log Message:
  [BPF] handle opaque-pointer for __builtin_preserve_enum_value

Opaque pointer [1] is enabled as the default with commit [2].
Andrii found that current __builtin_preserve_enum_value() can only handle
non opaque pointer code pattern and will segfault with latest
llvm main branch where opaque-pointer is enabled by default.

This patch added the opaque pointer support.
Besides llvm selftests, also verified with bpf-next bpf selftests.

  [1] https://llvm.org/docs/OpaquePointers.html
  [2] https://reviews.llvm.org/D123122

Differential Revision: https://reviews.llvm.org/D123800

More information about the All-commits mailing list