[PATCH] D61810: [BPF] add new intrinsics preserve_{array,union,struct}_access_index

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 16:46:12 PDT 2019


yonghong-song added a comment.

This update of three patches mostly a few intrinsic format changes (array +num_of_zeros for gep, array/struct -inst_name), and correspond adjustments to fix bugs.
This will unblock other kernel bpf developers which can work in parallel in kernel side.

I have not looked at the performance aspect yet. This is what I will do next to see where is the performance loss and how to avoid them.
I have not explored the approach to add meta data to instruction/intrinsics yet. Will do that once I did some performance analysis to ensure the
current approach does not cause performance degradation for perf. critical bpf applications.



================
Comment at: docs/LangRef.rst:16961
+      @llvm.preserve.array.access.index.p0s_union.anons.p0a10s_union.anons(<type> base,
+                                                                           i8 *inst_name,
+                                                                           i32 subscript)
----------------
efriedma wrote:
> inst_name seems unnecessary.
> 
> Don't you need some argument to indicate the type of the array elements?
I include inst_name only to generate original GEP similar to what clang did. But I agree that inst_name is unnecessary. The <type2> in the above is the pointer to the array element type.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61810





More information about the llvm-commits mailing list