[PATCH] D133361: [BPF] Attribute btf_decl_tag("ctx") for structs

Eduard Zingerman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 03:18:16 PDT 2023


eddyz87 added inline comments.


================
Comment at: llvm/include/llvm/IR/Intrinsics.td:2432
                                                   ImmArg<ArgIndex<2>>]>;
+def int_context_marker_bpf : DefaultAttrsIntrinsic<[llvm_ptr_ty],
+                                                   [llvm_ptr_ty],
----------------
yonghong-song wrote:
> Is it possible to make this builtin as BPF specific one?
Currently `llvm::Intrinsic::context_marker_bpf` gets defined in `llvm/IR/Intrinsics.h` (via include of generated file `IntrinsicEnums.inc`, same as `preserve_{struct,union,array}_access_index`).

BPF specific intrinsics are defined in `llvm/IR/IntrinsicsBPF.h` (generated directly w/o .inc intermediary).

Thus, if I move `context_marker_bpf` to `IntrinsicsBPF.td` I would have to include `IntrinsicsBPF.h` in `CGExpr.cpp`. However, I don't see any target specific includes in that file.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133361



More information about the llvm-commits mailing list